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

unknown feature proc_macro_span_shrink #401

Closed
rlovell3 opened this issue Jul 26, 2023 · 2 comments
Closed

unknown feature proc_macro_span_shrink #401

rlovell3 opened this issue Jul 26, 2023 · 2 comments

Comments

@rlovell3
Copy link

I'm at a bit of a loss on this one. I'm using rustc 1.73.0-nightly with cargo-leptos to build a simple web stack, and I keep getting a compile error that is focusing on proc-macro2-1.0.59. This is so deep into the bowels of the compiler that I'm not even sure of which direction I should be looking. If I remove the crate from inside my .cargo/registry/src/index.crates.io... it reappears as soon as I try to build (which makes sense, but I can't trace what is calling for it to be installed), and if I try the "RUSTFLAGS='--cfg procmacro2_semver_exempt' cargo build" command, I get an absolute ton of compile errors. Anybody got an idea on how to proceed?

@gftea
Copy link

gftea commented Jul 28, 2023

I have same issue in my project's CI run below, https://github.com/gftea/amqprs/actions/runs/5690927521/job/15426552955?pr=104

Run RUST_LOG=trace cargo llvm-cov --all-features --lcov --output-path ./lcov.info
warning: some crates are on edition 2021 which defaults to `resolver = "2"`, but virtual workspaces default to `resolver = "1"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
 Downloading crates ...
  Downloaded uriparse v0.[6](https://github.com/gftea/amqprs/actions/runs/5690927521/job/15426552955?pr=104#step:6:7).4
  Downloaded fnv v1.0.7
  Downloaded tokio-rustls v0.23.4
  Downloaded webpki-roots v0.22.6
   Compiling libc v0.2.137
   Compiling proc-macro2 v1.0.47
   Compiling unicode-ident v1.0.5
   Compiling quote v1.0.21
error[E0635]: unknown feature `proc_macro_span_shrink`
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.47/src/lib.rs:92:30
   |
92 |     feature(proc_macro_span, proc_macro_span_shrink)
   |                              ^^^^^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0635`.
error: could not compile `proc-macro2` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...
error: process didn't exit successfully: `/home/runner/.rustup/toolchains/nightly-x[8](https://github.com/gftea/amqprs/actions/runs/5690927521/job/15426552955?pr=104#step:6:9)6_64-unknown-linux-gnu/bin/cargo test --tests --manifest-path /home/runner/work/amqprs/amqprs/Cargo.toml --target-dir /home/runner/work/amqprs/amqprs/target/llvm-cov-target --all-features` (exit status: [10](https://github.com/gftea/amqprs/actions/runs/5690927521/job/15426552955?pr=104#step:6:11)1)

@smoelius
Copy link

This looks like a duplicate of #398.

  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.47/src/lib.rs:92:30
                                                                                    ^^^^^^

I think cargo update -p proc-macro2 may solve your problem.

@dtolnay dtolnay closed this as completed Jul 28, 2023
gftea added a commit to gftea/amqprs that referenced this issue Jul 31, 2023
Repository owner locked and limited conversation to collaborators Nov 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants