BlackPhlox / bevy_dolly

h3r2tic's dolly abstraction layer for the bevy game framework
Apache License 2.0
143 stars 22 forks source link

Upgrade to bevy 0.12 #40

Closed ActuallyHappening closed 9 months ago

ActuallyHappening commented 9 months ago

Hey, thanks for this awesome crate!

I wanted to use it in a bevy 0.12 project so quickly upgraded it. Also, I don't know why it was using a patched version of dolly? I just upgraded it to use the crates.io released version.

BlackPhlox commented 9 months ago

Hi there 👋 thanks for the pull request! We already have a branch which is currently being worked on, which should work with bevy 0.12 👍 https://github.com/BlackPhlox/bevy_dolly/tree/bevy_0.12

Regarding the patched version due to API ergonomics, the patching was made to use the transform of bevy instead of dolly's implementation, which removes the users' need for calling into_bevy_transform and vice versa.

Hope that makes sense :)

jasonpanosso commented 9 months ago

Do you run into this error when running cargo check/cargo build on your main branch @ActuallyHappening?

edit: I actually get this error on both the BlackPhlox:bevy_0.12 and ActuallyHappening:main branch, but not BlackPhlox:main o_O

error[E0599]: no method named `iter` found for reference `&MoveAction` in the current scope
   --> src/helpers/pos_ctrl.rs:127:29
    |
127 | ... b) in v.iter().enumerate() {
    |             ^^^^ method not found in `&MoveAction`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
jasonpanosso commented 9 months ago

I think my issue is caused by a change introduced in leafwing-input-manager v0.11, described here

InputMap::iter() now returns a simple iterator of (action, input) pairs

instead of InputMap::iter() returning (&PetitSet<UserInput, 16>, MoveAction), it now returns (&MoveAction, &Vec<UserInput>), with the order being swapped because breaking changes are fun : )

BlackPhlox commented 9 months ago

Sorry, my github on my phone glitched and closed the issue, would you be ok with changing the target branch to bevy_0.12 instead?

ActuallyHappening commented 9 months ago

Now that is interesting, cargo +stable c was OK, then I ran cargo update and it updated leafwing-input-manager:

Updating leafwing-input-manager v0.11.1 -> v0.11.2

After that, cargo +stable c failed. I'll fix this because my own project depends on it, but why is that a not a semver breaking change? Also, I noticed that the Cargo.lock is not committed so there is not way for me to reproduce my personal builds. I believe the recommended approach is to commit Cargo.lock to VCS, so I'll remove it from .gitignore's list

ActuallyHappening commented 9 months ago

Sorry, my github on my phone glitched and closed the issue, would you be ok with changing the target branch to bevy_0.12 instead?

I don't really mind, whatever helps it to get published on crates.io. Or scrapped because the bevy_0.12 branch does everything better than my own changes.

BlackPhlox commented 9 months ago

I've updated the bevy_0.12 branch so LWIM now compiles and I've updated the .gitignore to not include the Cargo.lock and set you as a Co-author on the commit. I'll do my very best to see if I can deploy to crates.io today