-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
fix: rename non send resources #13481
fix: rename non send resources #13481
Conversation
I would prefer to remove all mention of resource from The fact that |
I still think they could be considered resources (like a filesystem, a network, a printer, or even corn or pasta), because they are "things" needed to make the world run. If not |
I think we need a better noun for them: they aren't resources in the sense of |
I think the problem is they're just too similar to what resources are even if given a different label. A "resource" is really just a convenient way to store a "single global instance of some data" (to quote the Cheatbook— not because it speaks for Bevy's views but because it sorta shows how the community sees these types). They aren't a "resource" in that Granted, I’m not familiar with the discussion around the ultimate goals for handling non-send data so I could be waaayyy off haha. But imo if it still has the purpose of being a "thread-local/non-send global singleton" then it's still kind of a "resource" (especially if you access it via system parameter like you would a regular So I personally prefer the rename presented in this PR. |
@alice-i-cecile what should be the next steps for this PR (to approve or discard it)? |
Closing this out: I agree that this isn't a good name, but NonSend data needs a bigger refactor and it's not worth the churn for now. |
Objective
Rename non-send resources more consistently inside the crate.
Rewrite some docs to use "[
NonSendRes
] resource" instead of [!Send
]Rewrite some docs to use "[
NonSendRes
] resource" instead of "non-send resource"Migration Guide
World::contains_non_send_resource
in place ofWorld::contains_non_send