racer-rust / racer

Rust Code Completion utility
MIT License
3.36k stars 278 forks source link

Failed to build using latest nightly #1173

Open precompute opened 2 years ago

precompute commented 2 years ago
$ cargo +nightly install racer 
    Updating crates.io index
  Installing racer v2.1.48
   Compiling libc v0.2.109
   ...
   Compiling rustc-ap-rustc_data_structures v722.0.0
   Compiling rustc-ap-rustc_arena v722.0.0
   Compiling rustc-ap-rustc_span v722.0.0
error[E0635]: unknown feature `thread_local_const_init`
  --> /home/sys2/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-722.0.0/src/lib.rs:23:12
   |
23 | #![feature(thread_local_const_init)]
   |            ^^^^^^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0635`.
error: could not compile `rustc-ap-rustc_span` due to previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `racer v2.1.48`, intermediate artifacts can be found at `/tmp/cargo-installf8feJG`

Caused by:
  build failed
$ rustup run nightly rustc --version
rustc 1.59.0-nightly (0b6f079e4 2021-12-07)

It's an upstream issue: https://github.com/rust-lang/rust/issues/91543

kunfan96 commented 2 years ago

same as you,who can help me?

fakegermano commented 2 years ago

It's as @t-e-r-m said, an upstream issue with rustc-ap-rustc_span's build pipeline, it's been stale for more than 60 days and github decided to not run any more release actions! :+1:

If you need racer working, you can install it with nightly-2021-06-07 (maybe a further version as well, but this is the one I tested based on approximate dates for releases.

ghost commented 2 years ago

It's as @t-e-r-m said, an upstream issue with rustc-ap-rustc_span's build pipeline, it's been stale for more than 60 days and github decided to not run any more release actions! +1

If you need racer working, you can install it with nightly-2021-06-07 (maybe a further version as well, but this is the one I tested based on approximate dates for releases.

Installing /home/steve/.cargo/bin/racer
   Installed package `racer v2.1.48` (executable `racer`)
➜  rust-in-action racer --version
racer 2.1.48

nightly-2021-01-30-x86_64-unknown-linux-gnu does not work with this, but nightly-2021-06-07 is totally ok. Thanks buddy

calebcartwright commented 2 years ago

You can, and should, always look at the toolchain file to find an appropriate one. With the underlying dependencies racer has it's highly unlikely that toolchains earlier than the one specified will ever work, but yes latter ones may also work for a time.

https://github.com/racer-rust/racer/blob/48ed93d31dc0beea6fc7185e8496faa7fa9ded5c/rust-toolchain.toml#L2

fortystory commented 2 years ago

use: rustup toolchain add nightly-2021-06-07

cargo +nightly-2021-06-07 install racer