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

upgrade dependency proc-macro2 #129

Closed
jtmoon79 opened this issue Aug 29, 2023 · 1 comment
Closed

upgrade dependency proc-macro2 #129

jtmoon79 opened this issue Aug 29, 2023 · 1 comment

Comments

@jtmoon79
Copy link

tl;dr upgrading proc-macro2 version would avoid a known proc-macro2 bug error[E0635]: unknown feature proc_macro_span_shrink


My project is using test_case v3.1.0 which depends on proc-macro2 v1.0.52.

$ cargo tree
...
└── test-case v3.1.0
    └── test-case-macros v3.1.0 (proc-macro)
        ├── proc-macro-error v1.0.4
        │   ├── proc-macro-error-attr v1.0.4 (proc-macro)
        │   │   ├── proc-macro2 v1.0.52 (*)
        │   │   └── quote v1.0.26 (*)
        │   │   [build-dependencies]
        │   │   └── version_check v0.9.4
        │   ├── proc-macro2 v1.0.52 (*)
        │   ├── quote v1.0.26 (*)
        │   └── syn v1.0.109 (*)
        │   [build-dependencies]
        │   └── version_check v0.9.4
        ├── proc-macro2 v1.0.52 (*)
        ├── quote v1.0.26 (*)
        ├── syn v1.0.109 (*)
        └── test-case-core v3.1.0
            ├── cfg-if v1.0.0
            ├── proc-macro-error v1.0.4 (*)
            ├── proc-macro2 v1.0.52 (*)
            ├── quote v1.0.26 (*)
            └── syn v1.0.109 (*)

proc-macro2 Issue dtolnay/proc-macro2#356 causes failures of some tools like udeps with error

$ cargo +nightly udeps
error[E0635]: unknown feature `proc_macro_span_shrink`
  --> /home/ulug/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.52/src/lib.rs:92:30
   |
92 |     feature(proc_macro_span, proc_macro_span_shrink)
   |                              ^^^^^^^^^^^^^^^^^^^^^^

According to the linked proc-macro2 Issue

you need to upgrade proc-macro2 to 1.0.60+, downgrade proc-macro2 to 1.0.43 or before, downgrade the nightly toolchain to nightly-2023-06-28 or before, or use a non-nightly toolchain.

This error occurred on rust 1.70.0 and 1.72.0.

Can test-case upgrade it's proc-macro2 dependency version?

@luke-biel
Copy link
Collaborator

luke-biel commented Sep 16, 2023

Sorry for getting back to you so late. This is not a test-case issue, as we don't provide Cargo.lock with our crate (and I think these are not used when compiling dependency libraries anyway). You should update your project, our lock version 1.0 is compatible with everything that dtolnay released so far.

Try:
cargo update -p proc-macro2

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

No branches or pull requests

2 participants