-
-
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
Migrate component_reads_and_writes
#16339
Comments
component_reads_and_writes
This was deprecated in #15207. @chescock @pcwalton @SkiFire13, I'm not immediately sure on the migration strategy here. Bevy uses this internally in a few places, and the dynamic example uses it at Line 156 in e155fe1
I like the |
Note that the Short term I think the I would also consider reworking the |
How is it an abuse? I see I do agree that |
I'm ok with just exposing iteration over all components included in this set. But exposing how the set is defined (i.e. by inclusion or exclusion of some element) exposes implementation details.
I don't see the difference between that function and an |
#16348 provides one possible way forward. The general idea is to provide a higher level abstraction with fallibility in mind. That extra height allows the implementation details of |
# Objective - Does not correct #16339 but takes it out of the 0.15 milestone ## Solution - Make it future us problem instead of solving it now
# Objective - Does not correct #16339 but takes it out of the 0.15 milestone ## Solution - Make it future us problem instead of solving it now
Ah, is your worry that we'll introduce new kinds of infinite sets that can't be expressed that way? Like, I can imagine a future "this reads any component that implements a specific trait" access. (I'd consider adding those to be an API change rather than an implementation detail change, but it's a compatibility hazard either way.) Does @bushrat011899's approach in #16348 alleviate that concern? All infinite sets are collapsed in a single |
Yes, I think there are possibilities for changes like that to
Yes, it does solve that concern, however it feels a bit limited as an API. I worry that people will always assume it won't error, or they will replace an error with empty sets etc etc. |
Unfortunately the only other way I think we could resolve the unbounded-set issue would be to require the user to provide access to a reference (bounded) set (e.g., |
I think it might be possible to remove the call to |
Migrate
component_reads_and_writes
for the 0.16 release. bevy uses it internally and it is deprecated.It is being madedidn't work because it is used in an example. That fact makes this a 0.15 issue :)pub(crate)
in #16338.The text was updated successfully, but these errors were encountered: