-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Consider updating from syn@1
to syn@2
#8282
Comments
you can also use
|
@jakobhellermann Thanks for the heads up! I've updated the main post with the shorter log. :) (Though I've kept the version numbers and |
It's definitely being considered, some people tried but didn't manage to do it yet though... |
I've been giving this a shot this evening, however, it's quite the lift. Might take several more hours before I have anything worthy of a PR. Edit: As I push further up the stack I'm seeing a huge departure between syn@1's |
Incremental update which tackles the low hanging crates first. - bevy_derive (no code changes required) - bevy_macro_utils Everything else is currently broken in this branch and requires heavy refactoring. Attempt to tackle bevyengine#8282
Well, after spending more hours on it tonight, I would definitely change the label to The two I came across tonight which left me scratching my head were:
It's not a simple matter of replacing things, it's literally a new architecture which likely requires some rewrites of various sections. I suspect the newer approach in v2 would simplify things quite a bit, however, going to take quite a bit more thought on how to even tackle that design. |
I also took a stab at this and kind of got stuck. It doesn't help that the 'breaking changes' listed in syn's patch notes omit details about how to migrate. I'll take the chance to leave some per-crate notes here about what I ran into. bevy_encase_deriveThis crate imports a version of A first step to migrating bevy_macro_utilsIt might be worth investigating whether we need this crate. There's not a lot in it, most of its functions aren't being re-used anywhere, and it seems like OthersOther crates include It should be easier to migrate crate-by-crate if we refactor out whatever we have that's exporting |
@B-Reif Regarding being tied to No idea if that'll change your game plan, but worth mentioning regardless. |
Yeah that's my PR 😰 I got a little stuck on that too! |
Oh! Woops. My bad, I didn't realize that was your PR. 😅 Still, good to note for others who are reading this. :) |
For anyone looking at this issue, teoxoy/encase#35 (which migrates I am unsure how/if this would change the feasability of |
I have Bevy mostly migrated to |
Hi! I noticed that several parts of Bevy depend on
syn@1
. Perhaps you could consider updating to usesyn@2
wherever possible?Some things worth noting for anyone who intends to take on this suggestion:
syn@2
's MSRV is Rust 1.56, up fromsyn@1
's Rust 1.31. This shouldn't be a problem, since theCargo.toml
in Bevy'smain
branch specifies a MSRV of Rust 1.67.syn@2
may not be as simple as swapping the version number - there are a number of breaking changes insyn@2
, listed at https://github.com/dtolnay/syn/releases/tag/2.0.0.syn@1
. For the moment, I would not worry about those unless it makes it impossible to update tosyn@2
- the purpose of this issue is to recommend Bevy's transition tosyn@2
. (I will recommend those crates transition tosyn@2
soon - if not try to PR the changes myself.)P.S. If you're curious, here's the command I used, and the resulting log, to determine what creates are still depending on
syn@1
. This is done on a new blank project, with onlybevy = "0.10"
(and no additional features enabled beyond the default) added toCargo.toml
:cargo tree --invert syn@1.0.109 --depth 1
The text was updated successfully, but these errors were encountered: