Skip to content

Tracking issue for syn 2.0 inside rust-lang/rust #109302

Closed

Description

@Noratrieb

syn 2.0 was just released!
https://github.com/dtolnay/syn/releases/tag/2.0.0

We should try to fully eliminate syn 1.0 from our dependency tree for better compile times.

The current ways in which we depend on syn 1:

- [ ] `synstructure` (chalk and yoke) - https://github.com/mystor/synstructure/pull/57
- [x] `rustc_macros` (requires `synstructure` support, #109663)
- [x] [`chalk_derive`](https://github.com/rust-lang/chalk/blob/master/chalk-derive/Cargo.toml) (chalk) (requires `synstructure`) https://github.com/rust-lang/chalk/pull/793
- [x] `askama_derive` (used by rustdoc) #109512
- [x] `clap_derive` (used by cargo and several other tools) #110077
- [x] `declare_clippy_lint` https://github.com/rust-lang/rust-clippy/pull/10621
- [ ] `derive_new` (through rustfmt) - https://github.com/nrc/derive-new/pull/61
- [x] `tracing-attributes` (tracing, used in the compiler) https://github.com/tokio-rs/tracing/pull/2516
- [ ] `derive_more` (used in rustc_middle) - https://github.com/JelteF/derive_more/issues/249
- [x] `displaydoc` (used in icu4x) - https://github.com/yaahc/displaydoc/pull/42
- [x] `futures_macro` (dev dep of clippy) #110079
- [ ] `icu_provider_macros`: (icu4x)
- [x] `proc-macro-error`: (through clap)
- [x] `serde_derive`: (compiletest , cargo and probably more) #110078
- [x] `thiserror-impl`: (gitoxide through cargo) #110081
- [ ] `zerovec-derive`: (used in icu4x)
- [ ] `yoke-derive`: (used in icu4x)
- [ ] `zerofrom-derive`: (used in icu4x)
- [ ] `strum_macros` (spdx, licensing)
- [ ] `unic-langid-macros-impl`
- [ ] `derivative` (unmaintained)
  • and a few more

Fixing this involes updating the dependencies once they upgrade or contributing upgrades to them directly.

Activity

  1. added
    C-cleanupCategory: PRs that clean code up or issues documenting cleanup.
    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
    E-help-wantedCall for participation: Help is requested to fix this issue.
    on Mar 18, 2023
  2. jhpratt commented on Mar 18, 2023

    @jhpratt
    Member

    Mostly an aside: Is there a tracking issue for having a better (more thorough) proc macro API so that syn isn't necessary? I know there's #![feature(proc_macro_quote)] for output, but I'm not aware of anything for parsing.

  3. added a commit that references this issue on Mar 27, 2023
  4. added a commit that references this issue on Apr 9, 2023
  5. added a commit that references this issue on Apr 10, 2023
  6. added a commit that references this issue on Apr 11, 2023
  7. added 3 commits that reference this issue on Apr 11, 2023
  8. added a commit that references this issue on Apr 13, 2023
  9. Manishearth commented on May 2, 2023

    @Manishearth
    Member

    The databake and zerovec derives are probably in this group. We should update ICU4X, and I can cut patch releases for those crates once we land the syn update upstream.

  10. added a commit that references this issue on May 3, 2023
  11. 9 remaining items

  12. added a commit that references this issue on Jan 24, 2024
  13. added a commit that references this issue on Jan 26, 2024
  14. added a commit that references this issue on Jan 27, 2024
  15. added 4 commits that reference this issue on Jan 27, 2024
  16. added a commit that references this issue on Jan 29, 2024
  17. added a commit that references this issue on Jan 29, 2024
  18. GrigorenkoPV commented on Jun 27, 2024

    @GrigorenkoPV
    Contributor

    As you might have seen from the mentions, I have submitted a PR replacing derivative with a maintained alternative (#127042) and politely pestered the spdx-rs maintainers about making a new release (doubleopen-io/spdx-rs#33). When (and if) those two go through, the syn 1.* will officially be no more.

  19. added a commit that references this issue on Jun 27, 2024
  20. added a commit that references this issue on Jul 25, 2024
  21. GrigorenkoPV commented on Apr 19, 2026

    @GrigorenkoPV
    Contributor

    This will be closed by #154823

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-cleanupCategory: PRs that clean code up or issues documenting cleanup.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCE-help-wantedCall for participation: Help is requested to fix this issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions