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 #297

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

upgrade dependency proc-macro2 #297

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 phf v0.11.2 depends on proc-macro2 v1.0.52.

$ cargo tree
...
├── phf v0.11.2
│   ├── phf_macros v0.11.2 (proc-macro)
│   │   ├── phf_generator v0.11.1
│   │   │   ├── phf_shared v0.11.2
│   │   │   │   └── siphasher v0.3.10
│   │   │   └── rand v0.8.5
│   │   │       └── rand_core v0.6.4
│   │   ├── phf_shared v0.11.2 (*)
│   │   ├── proc-macro2 v1.0.52 (*)
│   │   ├── quote v1.0.26 (*)
│   │   └── syn v2.0.11 (*)
│   └── phf_shared v0.11.2
│       └── siphasher v0.3.10

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 rust-phf upgrade it's proc-macro2 dependency version?

@JohnTitor
Copy link
Member

I'm happy to see a PR :)

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