-
-
Notifications
You must be signed in to change notification settings - Fork 274
Update to Bevy 0.17 and rapier 0.29 along with dependencies nalgebra, glam #678
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
base: master
Are you sure you want to change the base?
Conversation
Guelakais
left a comment
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.
I see two options here if you want to do it right: split your commits further or squash everything together. On the one hand, your commits are too large. You are combining commits that only deal with documentation (the markdown files) with those that deal with the actual features (the Cargo.toml and *.rs files). This makes your commits very confusing. In addition, it is bad style to tinker with the same file multiple times and create a separate commit each time. Commits and pull requests should always be as small as possible to remain manageable. Here, you have changed the same file (changelog.md) with multiple commits. That is not necessary. Put all commits that deal with this file together. That makes the whole thing much cleaner.
Even though my response is very detailed, I think the pull request is good overall. Keep up the good work!
|
Hey! Yeah, the PR needs some work before going to the tree, I mostly just wanted to check if there was any interest in merging if I fixed it up, and I needed a quick fix for myself. It seemed rude to just barge in and make a large amount of changes which is why I wanted to gauge interest before sorting it, but if it's welcome I'll clean up the commits. |
mnmaita
left a comment
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.
Tested this branch in my project and so far so good! I'm leaving a few comments for you to review. Thanks a lot for creating this PR.
|
Implemented changes as requested, squashed the commits to be more understandable. First one is still big, but I have no real way of splitting it that I know of bar manually going from the beginning, sorry. Remaining question is if I should rename |
… to end in message.
|
I made the change as it is my personal preference. In the change I've added pub use aliases (with depreciation notices) to make possible a future removal. If this is not preferred, I'll simply revert later but since I was in the editor I thought I might as well. |
|
Regarding these version suggestions I'm pretty sure library consumers will get the latest versions of the dependencies if they |
You're right. My suggestions shouldn't prevent the merge. I've approved it now. In my experience, it's best to keep the Bevy dependency as up to date as possible, as Bevy version changes have introduced a lot of major API changes in the past. |
|
Thanks! it looks good, testbed examples are broken so I offered a fix at lukasfri#1 ; once CI is green it may be good to go :) ; I see wasm and wayland issues. |
Fix egui on testbed
|
@ThierryBerger Thanks! Need workflow approval to run CI |
|
Adding bevy_rapier/.github/workflows/main.yml Line 34 in 7258dc4
bevy_rapier/.github/workflows/main.yml Line 49 in 7258dc4
|
|
So close! Just need someone to kick the CI! :-) |
|
[Apologies if this is considered slightly off topic.] I've tried integrating this pull in my own project while traversing the bevy 0.17 upgrade, and I've encountered an issue I can't quite pin-point the source of. (I'm using bevy_rapier2d for reference)
I don't see anything in this pull that would have caused it, but perhaps more a bevy 0.17 behavior? The migration guide seems to suggest its just a rename for RemovedComponents, but figured I'd just mention it in passing while I was working on my own migration. |
|
@mnmaita CI start please ❤️ |
|
@tylersaunders No issue at all, seems reasonably on topic. I took a look myself and I can't find something either. Is it possible you could create a regression test that showcases the issue? |
|
@lukasfri I don't have such superpowers 😆 but anyway just wanted to point out that I think you've missed adding the wayland deps in L49 of |
|
@mnmaita Ah, sorry! Yeah I don't know how I missed that, was a bit too quick... |
|
Thanks for updating, the wasm issue comes from getrandom requiring a RUSTFLAG and the feature |
|
I've tested this on my URDF simulation that worked on 0.16 and now get bouncing behavior for urdf-imported robot. I've checked the colliders and they look fine. What might be the source of a regression? The body I'm simulating should behave as rigid, and I turned off all motors. bounce.mp4 |
| #[derive(Event, Copy, Clone, Debug, PartialEq, Eq)] | ||
| pub enum CollisionEvent { | ||
| #[derive(Copy, Clone, Debug, PartialEq, Eq, Message)] | ||
| pub enum CollisionMessage { |
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.
This PR changes all the events/messages to have the Message suffix, but I'll just note that it's generally not considered good practice. See Cart's message on event and message naming conventions. Cart even explicitly calls out the collision event example, that you should call it Collision, not CollisionMessage.
Additionally, Cart suggests that:
If the specific context of a message requires the "event" terminology for clarity, then the XEvent suffix is ok. Ex:
RawWinitWindowEvent
I think some of the types here might qualify under this. For example, we cannot call the ContactForceEvent just ContactForce, as that would be very confusing. In Rapier, this feature is fundamentally called a "contact force event" (link), and the fact that it is sent as a message doesn't change that. So it could potentially be left as ContactForceEvent.
This is similar to the philosophy I went for in Avian (though my event names are different). I still call collision events "collision events" and not "collision messages", even though they can also be written as messages. I had some more rationale in the Avian 0.4 release notes here:
The term “collision event” or “contact event” is extremely common across a variety of engines. With Bevy’s recent naming changes, it begs the question of whether we should abandon this standard and start calling the
Messageversion a “collision message”.From my point of view, the answer is no. The difference is subtle, but instead of saying that the type is a message, we say that it is written as a message. The defining factor of the type is that it is fundamentally a “collision event”, even if it can be sent as a message. See cart’s message on general naming guidelines for messages and events.
Anyway, the decision is up to Rapier people, I just wanted to point out Cart's suggested naming conventions in case people hadn't seen them :)
|
I just tested and it's working well for Windows, Web and Android 👍🏼 |
|
A couple of days ago, I started my project using Bevy and got stuck on the fact that rapier does not support the latest version of Bevy. What needs to be done to merge it and release a new version? I can allocate some time to help if needed. I think it makes sense to update Rapier to 0.30.1 |
|
There appears to exist a few issues that need to be fixed before merging:
I don't have the bandwidth right now to continue doing taking care of those issues myself, but I'll obviously merge any fixes into my branch. My interest in upgrading were limited to a side project I was doing to get it working for myself temporarily. However I've got no problem pressing CI buttons etc. If you @Deniskore want to tackle the above you're more than welcome. |
|
@lukasfri this possibly fixes the wasm issue
[target.wasm32-unknown-unknown]
rustflags = ["--cfg", "getrandom_backend=\"wasm_js\""] |
Plus enabling the js feature for [target.'cfg(all(target_family = "wasm", any(target_os = "unknown", target_os = "none")))'.dependencies]
getrandom = { version = "0.3", features = ["wasm_js"] }
getrandom_02 = { version = "0.2", features = ["js"], package = "getrandom" }The |
|
There are some doc failures too that should be easy to fix ( |
|
Guys, can someone ask sebcrozet to check my PR in the rapier repository? The changes are minimal, and we'll finally be able to merge my fix for bevy_rapier 👀 Most plugins have migrated to version 0.17.2 |
please post a link of your pr. |
|
@Deniskore If the PR you are mentioning is dimforge/rapier#894, I will check it out tomorrow. |
@Guelakais You can see references to both PRs above my message. Anyway, here are the links: @sebcrozet Yes! The link is correct. I am ready to fix any issues, if you provide the necessary feedback. |
|
Hey! My apologizes for not seeing this through. My last last few weeks have been very hectic so I haven't had any additional time available. Great job @Deniskore , thanks for finishing the work! |

Hey!
First time contributor. I don't quite know what I'm doing (no this is not in any way a vibecoded PR) but I was starting on a Bevy 0.17 project and needed bevy rapier for 0.17. I thought "how hard could it be" so I worked my way through updating all dependencies and making the necessary changes to get it to compile (including changing depreciations) and now everything seems to work fine (all tests pass). I fully understand if this migration needs changes, but it worked for me and in the meantime it works as a stopgap for anyone who wants a commit they can pin to.
Best wishes