racer-rust / racer

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

racer fails to build on MacOS #1044

Open mouse07410 opened 5 years ago

mouse07410 commented 5 years ago

Everything current-stable. MacOS 10.14.5.

$ cargo -v install racer
    Updating crates.io index
     Running `git fetch --tags --quiet 'https://github.com/rust-lang/crates.io-index' 'refs/heads/master:refs/remotes/origin/master'`
  Installing racer v2.1.22
error: failed to compile `racer v2.1.22`, intermediate artifacts can be found at `/var/folders/c6/lnc_0m093ys8w16md_fm1mnxhtfnj8/T/cargo-install4ppN3N`

Caused by:
  no matching version `^407.0.0` found for package `errors`
location searched: registry `https://github.com/rust-lang/crates.io-index`
versions found: 0.0.0
required by package `rustc-ap-syntax v407.0.0`
    ... which is depended on by `racer v2.1.22`
$ cargo --version
cargo 1.30.0
$ rustc -V
rustc 1.35.0 (3c235d560 2019-05-20)
$ 
eidenar commented 4 years ago

Have the same issue on nightly. MacOs 10.14.6

$ cargo +nightly install racer

error[E0046]: not all trait items implemented, missing: `mixed_site`
   --> /Users/eduard.miller/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-syntax-583.0.0/ext/proc_macro_server.rs:657:1
    |
657 | impl server::Span for Rustc<'_> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `mixed_site` in implementation
    |
    = note: `mixed_site` from trait: `fn(&mut Self) -> <Self as proc_macro::bridge::server::Types>::Span`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0046`.
error: could not compile `rustc-ap-syntax`.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `racer v2.1.27`, intermediate artifacts can be found at `/var/folders/v9/8vtyf4f94kd2k4jz_90ktgl00000gq/T/cargo-installtoBdLa`

$ cargo --version
cargo 1.40.0-nightly (8b0561d68 2019-09-30)
$ rustc -V
rustc 1.40.0-nightly (f3c9cece7 2019-10-07)

But still was able to install 2.0.13 version:

$ cargo +nightly install --version 2.0.13 racer

lovefengruoqing commented 4 years ago

I also encountered the problem, but it will be resolved when I install the nightly version.