-
-
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 basic system for specifying and validating archetype invariants #5121
Closed
sixfold-origami
wants to merge
61
commits into
bevyengine:main
from
sixfold-origami:basic-archetype-invariants
Closed
Changes from all commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
7afcc27
Add basic types for archetype invariants
sixfold-origami c4dc9e2
Add docs for Components init methods
sixfold-origami 22b7698
Add archetype invariants to World
sixfold-origami fbb2d54
Add basic archetype invariant helper
sixfold-origami df94ac3
Recheck archetype invariants when a new invariant is added
sixfold-origami 7dde3e8
Refactor to use both typed and untyped archetype invariants // WIP
sixfold-origami ff169fe
Rework API to use bundles and raw types
sixfold-origami 177afe6
Add `archetype_invariants` to `Archetype::new`
sixfold-origami cc1f9c1
Add archetype checking skeleton
sixfold-origami 3a88bb8
Add naieve archetype checking
sixfold-origami dc3d834
Remove superfluous comment
sixfold-origami 842f896
Run cargo fmt and clippy
sixfold-origami 2f64784
Check all archetypes whenever a new invariant is added
sixfold-origami d9a38c8
Improve error messages on archetype invariant failure
sixfold-origami 6f75a66
Change `BTreeSet`s to use `HashSet` instead
sixfold-origami 541111f
Add `AtMostOneOf` variant
sixfold-origami 6914e06
Run cargo fmt and cargo clippy
sixfold-origami 5b82d09
Fix docstring type references
sixfold-origami 2776b48
Apply documentation suggestions from code review
sixfold-origami 347db39
Improve docstrings and names
sixfold-origami 5eceedb
Add `Only` variant to `ArchetypeStatement`
sixfold-origami 67ff12e
Fix module imports
sixfold-origami 7a5d757
Fix test names
sixfold-origami b10e954
Fix docstring for `ArchetypeInvariants.add`
sixfold-origami 2bc2cfa
Change `predicate` to `premise`
sixfold-origami a8716cc
Rename `AtLeastOneOf` to `AnyOf`
sixfold-origami 3e06385
Add helper methods and tests for common invariants
sixfold-origami 702ef4e
Add `add_archetype_invariant` methods to `App`
sixfold-origami 1ff1299
Add archetype rechecking when adding an untyped archetype invariant
sixfold-origami 5d80c9f
Improve error messages when archetypes fail
sixfold-origami db0927d
Add archetype invariant types to the prelude
sixfold-origami 01d50f9
Fix format and clippy errors
sixfold-origami f8a23fc
Use `get_short_name` to further improve error messages
sixfold-origami 9d63648
Apply suggestions from code review - fix docstrings
sixfold-origami b293063
Rename exhaustive to exclusive
sixfold-origami 4c1759a
Apply suggestions from code review - fix docstrings
sixfold-origami 22b6af1
Remove warning when constructing `ArchetypeStatement::AnyOf` with a s…
sixfold-origami 5c0b806
Add basic example // WIP
sixfold-origami 7e76275
Add static true and false variants to `ArchetypeStatement`
sixfold-origami 5ec538d
Rename `requires_all` to `requires`
sixfold-origami 52cd331
Clean up example
sixfold-origami 5b20079
Add example metadata and transitivity information
sixfold-origami 38123ca
Clean up docs for archetype statements
sixfold-origami 4109138
Clean up docs around `UntypedArchetypeInvariant`
sixfold-origami 95428eb
Run cargo fmt
sixfold-origami 011bd2e
Update example name
sixfold-origami 9bb0cf4
Clean up example
sixfold-origami 0a920cb
Remove use of "tautologically true", replace with "always true"
sixfold-origami 97a33e6
Fix error message for on_insert failures, clean up error display logic
sixfold-origami 07dce54
Apply suggestions from code review - clean up docstrings and comments
sixfold-origami 16bc245
Remove `With` parameter from example
sixfold-origami 5ded872
Add trailing period to docstring
sixfold-origami 6691081
Make archetype testing functions pub(crate) instead of pub
sixfold-origami 966cdde
Merge remote-tracking branch 'plof27/basic-archetype-invariants' into…
sixfold-origami 835f7cd
Remove references to how to get `component_ids`
sixfold-origami 3649696
Fix statement docs
sixfold-origami 21a1a23
Rework helper method API to be defined on Bundles
sixfold-origami 190e7c9
Merge branch 'main' into basic-archetype-invariants
sixfold-origami 1acce11
Fix merge issues
sixfold-origami ed16ff7
🥺
sixfold-origami b7b7d47
Update docstrings to match 🥺
sixfold-origami 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
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
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.
It might be worth it to add why this is preferred