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

fix: upgrade bevy 0.12 #45

Closed
wants to merge 7 commits into from

Conversation

pietrosophya
Copy link

Upgrades the code to Bevy 0.12

@Toqozz
Copy link
Owner

Toqozz commented Feb 10, 2024

Thanks for this. I'll take a proper look tomorrow and make sure everything runs fine, but should be good.

Could you also update the version table in the README?

@pietrosophya
Copy link
Author

Thanks for this. I'll take a proper look tomorrow and make sure everything runs fine, but should be good.

Could you also update the version table in the README?

Done 😉

@Toqozz
Copy link
Owner

Toqozz commented Feb 11, 2024

I'm not sure why, but when I try to run the examples on this branch I get a compile error in bevy_reflect:

101 | ~/D/bevy_prototype_debug_lines --> cargo run --example 2d --features="example_deps_2d"
   Compiling bevy_reflect v0.12.1
error[E0521]: borrowed data escapes outside of method
  --> C:\Users\Toqoz\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_reflect-0.12.1\src\path\parse.rs:8:32
   |
8  | #[derive(Debug, PartialEq, Eq, Error)]
   |                                ^^^^^
   |                                |
   |                                `self` is a reference that is only valid in the method body
   |                                `self` escapes the method body here
   |                                argument requires that `'a` must outlive `'static`
9  | #[error(transparent)]
10 | pub struct ParseError<'a>(Error<'a>);
   |                       -- lifetime `'a` defined here
   |
   = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0521]: borrowed data escapes outside of method
  --> C:\Users\Toqoz\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_reflect-0.12.1\src\path\mod.rs:16:32
   |
16 | #[derive(Debug, PartialEq, Eq, Error)]
   |                                ^^^^^
   |                                |
   |                                `self` is a reference that is only valid in the method body
   |                                `self` escapes the method body here
   |                                argument requires that `'a` must outlive `'static`
17 | #[error(transparent)]
18 | pub struct AccessError<'a>(access::Error<'a>);
   |                        -- lifetime `'a` defined here
   |
   = note: this error originates in the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0521`.
error: could not compile `bevy_reflect` (lib) due to 2 previous errors

I couldn't find anyone else having the issue, and the bevy examples compile fine for me, so not sure what's going on here.

@IamTheCarl
Copy link

IamTheCarl commented Jun 3, 2024

I too am interested in seeing debug lines on 0.12, so I cloned the repo for this PR and tried it.
I did not get the error you got on any of the examples. Instead it just worked. The only hickup was that I needed to switch to the fix/upgrade-bevy-0.12 branch.

Could you verify that the examples don't work for you after switching to that branch?

Edit:
To take this testing further, I integrated the repository into my own personal project using cargo's patch feature, and it works just as I would expect it to under Bevy 0.12. I plan to build off this branch's work to update to Bevy 0.13.

@Toqozz
Copy link
Owner

Toqozz commented Jun 5, 2024

This does indeed seem to work now. Sorry for the delay. I've merged it manually since I had to do some commits to update the readme etc.

Thank you!

@Toqozz Toqozz closed this Jun 5, 2024
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