Skip to content
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

Upgrade to bevy 0.12 #40

Closed
wants to merge 7 commits into from

Conversation

ActuallyHappening
Copy link
Contributor

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
Copy link
Owner

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
Copy link

jasonpanosso commented Dec 2, 2023

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
Copy link

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
Copy link
Owner

BlackPhlox commented Dec 2, 2023

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?

@BlackPhlox BlackPhlox closed this Dec 2, 2023
@BlackPhlox BlackPhlox reopened this Dec 2, 2023
@ActuallyHappening
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants