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

Failed to compile taplo-cli 0.8.1 due to proc-macro2 #490

Closed
v0y4g3r opened this issue Oct 17, 2023 · 1 comment
Closed

Failed to compile taplo-cli 0.8.1 due to proc-macro2 #490

v0y4g3r opened this issue Oct 17, 2023 · 1 comment

Comments

@v0y4g3r
Copy link

v0y4g3r commented Oct 17, 2023

What happend

Failed to install/compile latest taplo-cli (v0.8.1) with rust toolchain nightly-2023-08-07.

$ rustc -V
rustc 1.73.0-nightly (f3623871c 2023-08-06)

$ cargo install taplo-cli --version ^0.8.1 --locked
cargo install taplo-cli --version ^0.8.1 --locked
    Updating crates.io index
  Downloaded taplo-cli v0.8.1
  Downloaded 1 crate (28.9 KB) in 0.96s
  Installing taplo-cli v0.8.1
    Updating crates.io index
warning: package `crossbeam-channel v0.5.6` in Cargo.lock is yanked in registry `crates-io`, consider running without --locked
    Updating crates.io index
  Downloaded taplo v0.12.1
  Downloaded lsp-async-stub v0.6.1
  Downloaded taplo-common v0.4.1
  Downloaded 3 crates (79.4 KB) in 1.15s
   Compiling autocfg v1.1.0
   Compiling proc-macro2 v1.0.47
   Compiling quote v1.0.21
   Compiling unicode-ident v1.0.5
   Compiling syn v1.0.103
   Compiling libc v0.2.136
   Compiling cfg-if v1.0.0
   Compiling version_check v0.9.4
   Compiling serde_derive v1.0.147
   Compiling once_cell v1.18.0
   Compiling memchr v2.5.0
   Compiling serde v1.0.147
   Compiling scopeguard v1.1.0
   Compiling crossbeam-utils v0.8.12
   Compiling cc v1.0.73
   Compiling rayon-core v1.9.3
   Compiling log v0.4.17
   Compiling pin-project-lite v0.2.9
   Compiling itoa v1.0.4
   Compiling either v1.8.0
   Compiling lazy_static v1.4.0
   Compiling futures-core v0.3.25
   Compiling parking_lot_core v0.9.4
   Compiling ryu v1.0.11
   Compiling smallvec v1.10.0
   Compiling regex-syntax v0.6.27
   Compiling ahash v0.7.6
   Compiling tracing-core v0.1.30
   Compiling memoffset v0.6.5
   Compiling crossbeam-epoch v0.9.11
   Compiling rayon v1.5.3
error[E0635]: unknown feature `proc_macro_span_shrink`
  --> /home/lei/.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)
   |                              ^^^^^^^^^^^^^^^^^^^^^^

   Compiling indexmap v1.9.1
   Compiling lock_api v0.4.9
   Compiling slab v0.4.7
For more information about this error, try `rustc --explain E0635`.
   Compiling num-traits v0.2.15
error: could not compile `proc-macro2` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `taplo-cli v0.8.1`, intermediate artifacts can be found at `/tmp/cargo-installbTm7YO`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

How to reproduce

# change rust toolchain
rustup override set nightly-2023-08-07

# try install taplo-cli
cargo install taplo-cli --version ^0.8.1 --locked

Related issue

rust-lang/rust#113152

Solutions

Manually specify proc-macro2 version to some newer ones like 1.0.66 would solve this.

@ia0
Copy link
Collaborator

ia0 commented Oct 17, 2023

Thanks for the bug report! This is already fixed in #449 and blocked on #473 to be released. Closing as duplicate.

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