Skip to content

Commit aa4170d

Browse files
committed
Rename schedule v3 to schedule (#7519)
# Objective - Follow up of #7267 ## Solution - Rename schedule_v3 to schedule - Suppress "module inception" lint
1 parent a9e2dee commit aa4170d

File tree

33 files changed

+62
-65
lines changed

33 files changed

+62
-65
lines changed

benches/benches/bevy_ecs/components/archetype_updates.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use bevy_ecs::{component::Component, schedule_v3::Schedule, world::World};
1+
use bevy_ecs::{component::Component, schedule::Schedule, world::World};
22
use criterion::{BenchmarkId, Criterion};
33

44
#[derive(Component)]

benches/benches/bevy_ecs/scheduling/running_systems.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use bevy_ecs::{component::Component, schedule_v3::Schedule, system::Query, world::World};
1+
use bevy_ecs::{component::Component, schedule::Schedule, system::Query, world::World};
22
use criterion::Criterion;
33

44
#[derive(Component)]

crates/bevy_app/src/app.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::{CoreSchedule, CoreSet, Plugin, PluginGroup, StartupSet};
22
pub use bevy_derive::AppLabel;
33
use bevy_ecs::{
44
prelude::*,
5-
schedule_v3::{
5+
schedule::{
66
apply_state_transition, common_conditions::run_once as run_once_condition,
77
run_enter_schedule, BoxedScheduleLabel, IntoSystemConfig, IntoSystemSetConfigs,
88
ScheduleLabel,
@@ -100,7 +100,7 @@ impl Debug for App {
100100
/// ```rust
101101
/// # use bevy_app::{App, AppLabel, SubApp, CoreSchedule};
102102
/// # use bevy_ecs::prelude::*;
103-
/// # use bevy_ecs::schedule_v3::ScheduleLabel;
103+
/// # use bevy_ecs::schedule::ScheduleLabel;
104104
///
105105
/// #[derive(Resource, Default)]
106106
/// struct Val(pub i32);
@@ -315,7 +315,7 @@ impl App {
315315
/// These systems sets only run if the [`State<S>`] resource matches their label.
316316
///
317317
/// If you would like to control how other systems run based on the current state,
318-
/// you can emulate this behavior using the [`state_equals`] [`Condition`](bevy_ecs::schedule_v3::Condition).
318+
/// you can emulate this behavior using the [`state_equals`] [`Condition`](bevy_ecs::schedule::Condition).
319319
///
320320
/// Note that you can also apply state transitions at other points in the schedule
321321
/// by adding the [`apply_state_transition`] system manually.
@@ -526,7 +526,7 @@ impl App {
526526
///
527527
/// ```
528528
/// use bevy_app::App;
529-
/// use bevy_ecs::schedule_v3::Schedules;
529+
/// use bevy_ecs::schedule::Schedules;
530530
///
531531
/// let app = App::empty()
532532
/// .init_resource::<Schedules>()
@@ -549,7 +549,7 @@ impl App {
549549
}
550550

551551
self.edit_schedule(CoreSchedule::Outer, |schedule| {
552-
schedule.set_executor_kind(bevy_ecs::schedule_v3::ExecutorKind::SingleThreaded);
552+
schedule.set_executor_kind(bevy_ecs::schedule::ExecutorKind::SingleThreaded);
553553
schedule.add_system(run_main_schedule);
554554
});
555555

crates/bevy_app/src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub mod prelude {
2828
}
2929

3030
use bevy_ecs::{
31-
schedule_v3::{
31+
schedule::{
3232
apply_system_buffers, IntoSystemConfig, IntoSystemSetConfig, IntoSystemSetConfigs,
3333
Schedule, ScheduleLabel, SystemSet,
3434
},
@@ -38,7 +38,7 @@ use bevy_ecs::{
3838

3939
/// The names of the default [`App`] schedules.
4040
///
41-
/// The corresponding [`Schedule`](bevy_ecs::schedule_v3::Schedule) objects are added by [`App::add_default_schedules`].
41+
/// The corresponding [`Schedule`](bevy_ecs::schedule::Schedule) objects are added by [`App::add_default_schedules`].
4242
#[derive(ScheduleLabel, Clone, Debug, PartialEq, Eq, Hash)]
4343
pub enum CoreSchedule {
4444
/// The schedule that runs once when the app starts.
@@ -74,7 +74,7 @@ impl CoreSchedule {
7474
/// Initializes a single threaded schedule for [`CoreSchedule::Outer`] that contains the [`outer_loop`](CoreSchedule::outer_loop) system.
7575
pub fn outer_schedule() -> Schedule {
7676
let mut schedule = Schedule::new();
77-
schedule.set_executor_kind(bevy_ecs::schedule_v3::ExecutorKind::SingleThreaded);
77+
schedule.set_executor_kind(bevy_ecs::schedule::ExecutorKind::SingleThreaded);
7878
schedule.add_system(Self::outer_loop);
7979
schedule
8080
}
@@ -84,7 +84,7 @@ impl CoreSchedule {
8484
///
8585
/// These are ordered in the same order they are listed.
8686
///
87-
/// The corresponding [`SystemSets`](bevy_ecs::schedule_v3::SystemSet) are added by [`App::add_default_schedules`].
87+
/// The corresponding [`SystemSets`](bevy_ecs::schedule::SystemSet) are added by [`App::add_default_schedules`].
8888
///
8989
/// The `*Flush` sets are assigned to the copy of [`apply_system_buffers`]
9090
/// that runs immediately after the matching system set.
@@ -100,7 +100,7 @@ pub enum CoreSet {
100100
PreUpdate,
101101
/// The copy of [`apply_system_buffers`] that runs immediately after `PreUpdate`.
102102
PreUpdateFlush,
103-
/// Applies [`State`](bevy_ecs::schedule_v3::State) transitions
103+
/// Applies [`State`](bevy_ecs::schedule::State) transitions
104104
StateTransitions,
105105
/// Runs systems that should only occur after a fixed period of time.
106106
///
@@ -160,7 +160,7 @@ impl CoreSet {
160160

161161
/// The names of the default [`App`] startup sets, which live in [`CoreSchedule::Startup`].
162162
///
163-
/// The corresponding [`SystemSets`](bevy_ecs::schedule_v3::SystemSet) are added by [`App::add_default_schedules`].
163+
/// The corresponding [`SystemSets`](bevy_ecs::schedule::SystemSet) are added by [`App::add_default_schedules`].
164164
///
165165
/// The `*Flush` sets are assigned to the copy of [`apply_system_buffers`]
166166
/// that runs immediately after the matching system set.

crates/bevy_app/src/schedule_runner.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ use std::{cell::RefCell, rc::Rc};
1111
#[cfg(target_arch = "wasm32")]
1212
use wasm_bindgen::{prelude::*, JsCast};
1313

14-
/// Determines the method used to run an [`App`]'s [`Schedule`](bevy_ecs::schedule_v3::Schedule).
14+
/// Determines the method used to run an [`App`]'s [`Schedule`](bevy_ecs::schedule::Schedule).
1515
///
1616
/// It is used in the [`ScheduleRunnerSettings`].
1717
#[derive(Copy, Clone, Debug)]
1818
pub enum RunMode {
1919
/// Indicates that the [`App`]'s schedule should run repeatedly.
2020
Loop {
21-
/// The minimum [`Duration`] to wait after a [`Schedule`](bevy_ecs::schedule_v3::Schedule)
21+
/// The minimum [`Duration`] to wait after a [`Schedule`](bevy_ecs::schedule::Schedule)
2222
/// has completed before repeating. A value of [`None`] will not wait.
2323
wait: Option<Duration>,
2424
},
@@ -37,7 +37,7 @@ impl Default for RunMode {
3737
/// It gets added as a [`Resource`](bevy_ecs::system::Resource) inside of the [`ScheduleRunnerPlugin`].
3838
#[derive(Copy, Clone, Default, Resource)]
3939
pub struct ScheduleRunnerSettings {
40-
/// Determines whether the [`Schedule`](bevy_ecs::schedule_v3::Schedule) is run once or repeatedly.
40+
/// Determines whether the [`Schedule`](bevy_ecs::schedule::Schedule) is run once or repeatedly.
4141
pub run_mode: RunMode,
4242
}
4343

@@ -59,15 +59,15 @@ impl ScheduleRunnerSettings {
5959
}
6060
}
6161

62-
/// Configures an [`App`] to run its [`Schedule`](bevy_ecs::schedule_v3::Schedule) according to a given
62+
/// Configures an [`App`] to run its [`Schedule`](bevy_ecs::schedule::Schedule) according to a given
6363
/// [`RunMode`].
6464
///
6565
/// [`ScheduleRunnerPlugin`] is included in the
6666
/// [`MinimalPlugins`](https://docs.rs/bevy/latest/bevy/struct.MinimalPlugins.html) plugin group.
6767
///
6868
/// [`ScheduleRunnerPlugin`] is *not* included in the
6969
/// [`DefaultPlugins`](https://docs.rs/bevy/latest/bevy/struct.DefaultPlugins.html) plugin group
70-
/// which assumes that the [`Schedule`](bevy_ecs::schedule_v3::Schedule) will be executed by other means:
70+
/// which assumes that the [`Schedule`](bevy_ecs::schedule::Schedule) will be executed by other means:
7171
/// typically, the `winit` event loop
7272
/// (see [`WinitPlugin`](https://docs.rs/bevy/latest/bevy/winit/struct.WinitPlugin.html))
7373
/// executes the schedule making [`ScheduleRunnerPlugin`] unnecessary.

crates/bevy_diagnostic/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ mod log_diagnostics_plugin;
55
mod system_information_diagnostics_plugin;
66

77
use bevy_app::prelude::*;
8-
use bevy_ecs::schedule_v3::IntoSystemConfig;
8+
use bevy_ecs::schedule::IntoSystemConfig;
99
pub use diagnostic::*;
1010
pub use entity_count_diagnostics_plugin::EntityCountDiagnosticsPlugin;
1111
pub use frame_time_diagnostics_plugin::FrameTimeDiagnosticsPlugin;

crates/bevy_ecs/examples/change_detection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use bevy_ecs::{prelude::*, schedule_v3::IntoSystemConfig};
1+
use bevy_ecs::{prelude::*, schedule::IntoSystemConfig};
22
use rand::Rng;
33
use std::ops::Deref;
44

crates/bevy_ecs/macros/src/lib.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -528,9 +528,7 @@ pub fn derive_world_query(input: TokenStream) -> TokenStream {
528528
pub fn derive_schedule_label(input: TokenStream) -> TokenStream {
529529
let input = parse_macro_input!(input as DeriveInput);
530530
let mut trait_path = bevy_ecs_path();
531-
trait_path
532-
.segments
533-
.push(format_ident!("schedule_v3").into());
531+
trait_path.segments.push(format_ident!("schedule").into());
534532
trait_path
535533
.segments
536534
.push(format_ident!("ScheduleLabel").into());
@@ -542,9 +540,7 @@ pub fn derive_schedule_label(input: TokenStream) -> TokenStream {
542540
pub fn derive_system_set(input: TokenStream) -> TokenStream {
543541
let input = parse_macro_input!(input as DeriveInput);
544542
let mut trait_path = bevy_ecs_path();
545-
trait_path
546-
.segments
547-
.push(format_ident!("schedule_v3").into());
543+
trait_path.segments.push(format_ident!("schedule").into());
548544
trait_path.segments.push(format_ident!("SystemSet").into());
549545
derive_set(input, &trait_path)
550546
}

crates/bevy_ecs/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub mod query;
1414
#[cfg(feature = "bevy_reflect")]
1515
pub mod reflect;
1616
pub mod removal_detection;
17-
pub mod schedule_v3;
17+
pub mod schedule;
1818
pub mod storage;
1919
pub mod system;
2020
pub mod world;
@@ -35,7 +35,7 @@ pub mod prelude {
3535
event::{Event, EventReader, EventWriter, Events},
3636
query::{Added, AnyOf, ChangeTrackers, Changed, Or, QueryState, With, Without},
3737
removal_detection::RemovedComponents,
38-
schedule_v3::{
38+
schedule::{
3939
apply_state_transition, apply_system_buffers, common_conditions::*, IntoSystemConfig,
4040
IntoSystemConfigs, IntoSystemSet, IntoSystemSetConfig, IntoSystemSetConfigs, NextState,
4141
OnEnter, OnExit, OnUpdate, Schedule, Schedules, State, States, SystemSet,

crates/bevy_ecs/src/schedule_v3/condition.rs renamed to crates/bevy_ecs/src/schedule/condition.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ mod sealed {
2525
}
2626

2727
pub mod common_conditions {
28-
use crate::schedule_v3::{State, States};
28+
use crate::schedule::{State, States};
2929
use crate::system::{Res, Resource};
3030

3131
/// Generates a [`Condition`](super::Condition)-satisfying closure that returns `true`

0 commit comments

Comments
 (0)