-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Label type #1423
Closed
Closed
Add Label type #1423
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
2bd15fa
Add Label type
TheRawMeatball f41d7eb
General improvement
TheRawMeatball 85eebf2
Fix stuff
TheRawMeatball 857fa83
hotfix
TheRawMeatball d0cc270
rework to implement suggestions
TheRawMeatball 52567f5
cargo fmt
TheRawMeatball 37941ba
cargo test
TheRawMeatball fd3747c
Improve Debug impl on dyn Label
TheRawMeatball 4b90fb0
Apply suggestions from code review
TheRawMeatball b8af092
hotfix
TheRawMeatball c28f3fd
Implement minor suggestion
TheRawMeatball 099f8a6
Revert changes in tests
TheRawMeatball e70a8c1
Fix doctest
TheRawMeatball c002ba2
Fix inconsistencies
TheRawMeatball 2e95129
Merge remote-tracking branch 'upstream/master' into zst-labels
TheRawMeatball c5724f6
Revert accidental changes
TheRawMeatball 9c70a5d
Switch to requirig Debug impl
TheRawMeatball 6d82c4e
cargo fmt
TheRawMeatball b7f1e85
Fix test
TheRawMeatball 6e8f6fd
Merge 'upstream/master' into zst-labels
TheRawMeatball 62f1eef
Fancify labels
TheRawMeatball da24443
mod/use consistency
cart 7c20ed2
Implement requested changes
TheRawMeatball a904796
cargo fmt
TheRawMeatball ea539b0
Improvements from @Ratyzs
Ratysz 3f0d074
Resolve conflicts
Ratysz c6db7b5
Explicit execution order ambiguities API (#1469) (#5)
Ratysz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
/// The names of the default App stages | ||
pub mod stage; | ||
/// The names of the default App startup stages | ||
pub mod startup_stage; | ||
|
||
mod app; | ||
mod app_builder; | ||
mod event; | ||
|
@@ -23,6 +18,39 @@ pub mod prelude { | |
app::App, | ||
app_builder::AppBuilder, | ||
event::{EventReader, Events}, | ||
stage, DynamicPlugin, Plugin, PluginGroup, | ||
CoreStage, DynamicPlugin, Plugin, PluginGroup, StartupStage, | ||
}; | ||
} | ||
|
||
use bevy_ecs::StageLabel; | ||
|
||
/// The names of the default App stages | ||
#[derive(Debug, Hash, PartialEq, Eq, Clone, StageLabel)] | ||
pub enum CoreStage { | ||
/// Runs once at the beginning of the app. | ||
Startup, | ||
/// Name of app stage that runs before all other app stages | ||
First, | ||
/// Name of app stage that runs before EVENT | ||
PreEvent, | ||
/// Name of app stage that updates events. Runs before UPDATE | ||
Event, | ||
/// Name of app stage responsible for performing setup before an update. Runs before UPDATE. | ||
PreUpdate, | ||
/// Name of app stage responsible for doing most app logic. Systems should be registered here by default. | ||
Update, | ||
/// Name of app stage responsible for processing the results of UPDATE. Runs after UPDATE. | ||
PostUpdate, | ||
/// Name of app stage that runs after all other app stages | ||
Last, | ||
} | ||
/// The names of the default App startup stages | ||
#[derive(Debug, Hash, PartialEq, Eq, Clone, StageLabel)] | ||
pub enum StartupStage { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like to use the following order for imports:
|
||
/// Name of app stage that runs once before the startup stage | ||
PreStartup, | ||
/// Name of app stage that runs once when an app starts up | ||
Startup, | ||
/// Name of app stage that runs once after the startup stage | ||
PostStartup, | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO
CoreStage
andStartupStage
should be marked #[non_exhaustive] to signal that they're not fixed or exhaustive, and avoid people trying to exhaustively pattern match to them.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why'd they try to match this enum? Values of these types are only produced by user code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, that's a fair point. I'm trying to think of cases where you might possibly try but can't.