Update syn to version 3 (supersedes #25697) (#25844) - #25846
Conversation
There was a problem hiding this comment.
I did not raise the encase_derive_impl requirement to keep this PR minimal. With this change, resolving encase_derive_impl 0.12.1 (syn 2) would fail with the same "multiple different versions of syn" error, so it may be worth requiring 0.12.2 or newer explicitly. Happy to add that if reviewers prefer.
i think it should be changed. we don't want compilation to fail on 0.20 because people forgot to cargo update or depend on encase_derive_impl = 0.12.1 somewhere
|
this is blocked on a response from encase. as the new published version also broke released Bevy, it would be better for us if the 0.12.2 would be yanked |
|
For now I've raised the requirement to |
Migrated across three Bevy minors (0.16 → 0.17 → 0.18 → 0.19): - Buffered events are Messages now (SliderChanged, HyperLinkClicked, dialogue events); consumers read them with MessageReader. - UI transforms: hit-testing (hypertext links, slider, window drag, scroll thumb, viewport3d) moved to UiGlobalTransform and runs in logical-pixel space throughout — correct on HiDPI. Fixes hypertext clicks silently dying after the 0.17 UI-transform split. - Parley text: FontSize::Px sizes, FontSource fonts, glyph hit-testing via PositionedGlyph.atlas_info/section_index. - BorderColor::all() (per-side borders), BorderRadius as a Node field, ScrollPosition as Vec2 newtype, WorldAssetRoot (scene rework), RenderTarget as a component, shadow_maps_enabled. - bevy_ui_render feature enabled by the lib — 0.17+ ships UI rendering behind it; default-features=false consumers rendered nothing without it. - Edition 2024 (merged doctests: full doc run 25 min → 3 s), MSRV 1.95. - Temporary `encase = "=0.12.1"` anchor: encase 0.12.2 jumped to syn 3 in a patch release and breaks fresh lockfiles against current Bevy (still syn 2). Remove once bevyengine/bevy#25846 ships.
|
I yanked v0.12.2. Sorry for the breakage - I forgot |
|
I released v0.13. |
|
encase 0.12.2 has been yanked, so this is no longer urgent. The remaining goal is the syn 3 migration. I'd like to bump Waiting for |
|
Raised bitshifter/glam-rs#856 |
|
Blocking on the glam bump, ty all :) |
|
https://github.com/unclepomedev/bevy/pull/1 bumps encase and glam |
Bump encase and glam
Merged, and verified. |
Objective
encase_derive_impl0.12.2 moved to syn 3.bevy_encase_derivedepends onencase_derive_impl = "0.12", so a fresh dependency resolution picks it up whilebevy_macro_utilsis still on syn 2. The build then fails with "multiple different versions of cratesynin the dependency graph". This breaks CI and any build without aCargo.lock.encase_derive_impl0.12.2 was yanked;mainbuilds again. The remaining goal is the syn 3 migration itself.Part of Bevy 0.19.1 fails to build without a Cargo.lock: encase 0.12.2 pulls in encase_derive_impl with syn 3 #25844Fixes Update syn requirement from 2.0 to 3.0 #25834SinceI rebuilt this on top of currentmainis currently broken,maininstead of rebasing the old branch.This only addressesWith the yanking of encase 0.12.2, a patch for existing versions is no longer needed.main. Additional fixes for the already published 0.19.x are required.Solution
synto 3 in all crates that use it and adapt the code to the syn 3 API changes (bevy_reflect_derive,bevy_scenemacros). This is based on Update syn to version 3 #25697 by @agluszak, cherry-picked onto currentmainwith authorship preserved.bevy_encase_derivethat round-tripped the path through a string, sinceencase_derive_impl0.12.20.13 now uses syn 3 as well.I did not raise theUpdatedencase_derive_implrequirement to keep this PR minimal. With this change, resolvingencase_derive_impl0.12.1 (syn 2) would fail with the same "multiple different versions ofsyn" error, so it may be worth requiring0.12.2or newer explicitly. Happy to add that if reviewers prefer.encase/encase_derive_implto 0.13 andglamto 0.33.9 (which supports encase 0.13 via itsencase-013feature).Testing
Cargo.lockand rancargo buildfrom a clean state: succeeds. (The failure only appears with a fresh dependency resolution.)cargo run --example animated_meshworks with the updatedencase/glamversions.