-
-
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
0.4 -> 0.5 Migration Guide #1601
Comments
Tentative: |
Okay, I've reviewed the closed PRs going back to the 0.4 release so I think that's most of the breaking changes, other than :thepr:. |
|
From #1525:
|
Thanks yall! If anyone wants to volunteer to write the guide, that would be much appreciated. Otherwise I'll get to it eventually 😄 Each migration item should have a description of the change (with rationale if you anticipate a negative response), descriptions of breakage symptoms (when that is relevant and non-obvious), and small before/after code snippets where relevant |
I think this should probably be a new section of the book that we link to from the 0.5 release blog post |
Theres enough items here that we should do this piece by piece (which will also help us distribute the work) |
So I'm looking for someone to create the template others can build off of. And people should claim numbered items in this thread before working on them. |
@cart want to create a draft PR for this that we can make pull requests onto? Seems like a good way to collaborate. |
Good call! Putting that together now. |
There are a few breaking changes in glam 0.13.0 documented here https://github.com/bitshifter/glam-rs/blob/master/CHANGELOG.md. The one people might get caught out by is |
I can take a stab at 2 & 3 -- will also add a small note about Commands' extra lifetime to 1) -- may not be a super common case but it bit me the other day... |
|
Would it make sense to mention the branch name change from master -> main? Still seeing a decent amount of people in #help on master. |
|
|
I don't know if it's helpful, but these are the changes I had to make to my project when upgrading from 0.4 to latest main commit just now:
Sorry if some (or all) of these are already mentioned above. |
Thanks @alexschrod; this is very helpful. The simple code re-organization changes I think are too small to be worth listing on their own, and are trivial enough to figure out how to fix for any user that isn't just glob-importing from the prelude.
|
Created by @jakobhellermann: a little cleanup script for doing the basic migration! |
I will write something for 4 & 5 |
|
I'll look into documenting this today. Update:
|
|
Finally, something I know about. I'll take 30. |
I had to make this change: From: impl FromResources for MyResource {
fn from_resources(resources: &Resources) -> Self {
Self { }
}
} To: impl FromWorld for MyResource {
fn from_world(world: &mut World) -> Self {
Self { }
}
} |
'Camera' uniform should be renamed to 'CameraViewProj' |
I'm not entirely sure if I'm happy with |
I am happy with it! I think it fits well. In both cases the unstated subject is component(s). How do you insert a component? A few months back I got stuck for an hour before I figured out the old API's unstated subject was "bundle of components" for the short method (while the long method was completely explicit--not great symmetry there). I was trying to add a single component with the method that required a bundle 🤦🏼♂️ --it was confusing. |
New example from today: handling migration of WorldQuery generic parameters. Link. |
|
Pull request #1703 made a breaking change by moving some methods from Commands to EntityCommands. |
The Commands.spawn method has changed from 0.4 to 0.5 as far as I see. |
The changes to commands that are not currently covered in the migration guide are documented pretty well here: #1703 (and mentioned speculatively above in "number 22") An awesome first contribution to Bevy would be a PR that adds this info (and the many other points not covered) to the migration guide. |
Added bevyengine/bevy-website#129 which covers number 12 and somewhat minimally, number 22. |
I just opened bevyengine/bevy-website#133, very glad to see this kind of content being prioritized! |
|
I think we can safely close this one out :) |
0.5 will have breaking changes, and some of them will not be intuitive. We should have an official migration guide to help our users upgrade.
Lets use this issue as a way to track the important breaking changes to include. I'll start with:
commands: &mut Commands
has changed back tomut commands: Commands
. This will cause previously validfoo.system()
calls to fail to compile.commands.insert_one(component)
is nowcommands.insert(component)
.commands.insert(bundle)
is nowcommands.insert_bundle(bundle)
. This means that 0.4 code that doescommands.insert(bundle)
will now attempt to insertbundle
as a component instead of a bundle, which will cause breakage. This will cause confusion, but this change was made to help make bundles less easy to confuse with components, so I think that it is ultimately the right call.The text was updated successfully, but these errors were encountered: