Skip to content

Update syn to version 3 (supersedes #25697) (#25844) - #25846

Merged
alice-i-cecile merged 6 commits into
bevyengine:mainfrom
unclepomedev:main
Sep 24, 2026
Merged

alice-i-cecile merged 6 commits into
bevyengine:mainfrom
unclepomedev:main

Conversation

@unclepomedev

@unclepomedev unclepomedev commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Objective

Solution

  • Update syn to 3 in all crates that use it and adapt the code to the syn 3 API changes (bevy_reflect_derive, bevy_scene macros). This is based on Update syn to version 3 #25697 by @agluszak, cherry-picked onto current main with authorship preserved.
  • Remove the workaround in bevy_encase_derive that round-tripped the path through a string, since encase_derive_impl 0.12.2 0.13 now uses syn 3 as well.
  • 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. Updated encase/encase_derive_impl to 0.13 and glam to 0.33.9 (which supports encase 0.13 via its encase-013 feature).

Testing

  • Deleted Cargo.lock and ran cargo build from a clean state: succeeds. (The failure only appears with a fresh dependency resolution.)
  • Verified cargo run --example animated_mesh works with the updated encase/glam versions.
  • Rest is covered by CI.

@Zeophlite Zeophlite added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it D-Straightforward Simple bug fixes and API improvements, docs, test and examples labels Sep 19, 2026

@cookie1170 cookie1170 left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@mockersf

Copy link
Copy Markdown
Member

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

@unclepomedev

Copy link
Copy Markdown
Contributor Author

For now I've raised the requirement to 0.12.2, which is what we can do on Bevy side. Separately, I've asked for 0.12.2 to be yanked in teoxoy/encase#117, so this probably has to wait for a response there. If it is republished as 0.13, I'll update the requirement accordingly.

nazgull08 added a commit to nazgull08/bevy_ui_actions that referenced this pull request Sep 19, 2026
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.
@teoxoy

teoxoy commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

I yanked v0.12.2. Sorry for the breakage - I forgot encase_derive_impl has syn types in its public interface...

@teoxoy

teoxoy commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

I released v0.13.

@unclepomedev

unclepomedev commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor Author

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 encase along with it, but glam still depends on encase 0.12, so that isn't possible yet.

Waiting for glam might let us migrate without the FIXME workaround from #25697, but I don't know when that will happen. So I can either close this in favor of #25697, or keep it as a draft until glam catches up. If there's no preference, I'll close this.

@unclepomedev
unclepomedev marked this pull request as draft September 19, 2026 19:08
@Zeophlite

Copy link
Copy Markdown
Contributor

Raised bitshifter/glam-rs#856

@alice-i-cecile
alice-i-cecile marked this pull request as ready for review September 22, 2026 03:39
@alice-i-cecile
alice-i-cecile added this pull request to the merge queue Sep 22, 2026
@alice-i-cecile
alice-i-cecile removed this pull request from the merge queue due to a manual request Sep 22, 2026
@alice-i-cecile alice-i-cecile added C-Dependencies A change to the crates that Bevy depends on S-Blocked This cannot move forward until something else changes A-Cross-Cutting Impacts the entire engine X-Uncontroversial This work is generally agreed upon and removed S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it labels Sep 22, 2026
@alice-i-cecile

Copy link
Copy Markdown
Member

Blocking on the glam bump, ty all :)

@Zeophlite

Copy link
Copy Markdown
Contributor

https://github.com/unclepomedev/bevy/pull/1 bumps encase and glam

@Zeophlite Zeophlite added S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged and removed S-Blocked This cannot move forward until something else changes labels Sep 24, 2026
@unclepomedev

Copy link
Copy Markdown
Contributor Author

unclepomedev#1 bumps encase and glam

Merged, and verified. bevy_math's glam dependency doesn't enable encase-013. No downstream impact, and it keeps the dependency minimal. Can be added later if bevy_math itself starts using encase traits.

@Zeophlite Zeophlite added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Sep 24, 2026
@alice-i-cecile
alice-i-cecile added this pull request to the merge queue Sep 24, 2026
Merged via the queue into bevyengine:main with commit dde228a Sep 24, 2026
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Cross-Cutting Impacts the entire engine C-Dependencies A change to the crates that Bevy depends on D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it X-Uncontroversial This work is generally agreed upon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants