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

cargo +nightly build racer Error #1184

Open
gosoon opened this issue Dec 11, 2022 · 8 comments
Open

cargo +nightly build racer Error #1184

gosoon opened this issue Dec 11, 2022 · 8 comments

Comments

@gosoon
Copy link

gosoon commented Dec 11, 2022

Help,build failed in mac.

➜  racer git:(master) cargo -V
cargo 1.62.0-nightly (1ef1e0a12 2022-03-31)

➜  racer git:(master) rustup show
Default host: x86_64-apple-darwin
rustup home:  /Users/feiyu/.rustup

installed toolchains
--------------------

stable-x86_64-apple-darwin (default)
nightly-2022-04-06-x86_64-apple-darwin
nightly-x86_64-apple-darwin

active toolchain
----------------

nightly-2022-04-06-x86_64-apple-darwin (overridden by '/Users/feiyu/go/src/github.com/racer-rust/racer/rust-toolchain.toml')
rustc 1.62.0-nightly (306ba8357 2022-04-05)
➜  racer git:(master) cargo +nightly build --release
   Compiling racer-interner v0.1.0 
   Compiling racer-cargo-metadata v0.1.2
   Compiling racer v2.2.2 
error[E0432]: unresolved import `rustc_ast::ast::BindingMode`
  --> src/racer/ast_types.rs:21:26
   |
21 | pub use rustc_ast::ast::{BindingMode, Mutability};
   |                          ^^^^^^^^^^^ no `BindingMode` in `ast`

error[E0407]: method `fluent_bundle` is not a member of trait `Emitter`
  --> src/racer/ast.rs:33:5
   |
33 | /     fn fluent_bundle(&self) -> Option<&Lrc<rustc_errors::FluentBundle>> {
34 | |         None
35 | |     }
   | |_____^ not a member of trait `Emitter`

error[E0407]: method `fallback_fluent_bundle` is not a member of trait `Emitter`
  --> src/racer/ast.rs:36:5
   |
36 | /     fn fallback_fluent_bundle(&self) -> &Lrc<rustc_errors::FluentBundle> {
37 | |         unimplemented!("diagnostic translations are unimplemented in racer");
38 | |     }
   | |_____^ not a member of trait `Emitter`

error[E0412]: cannot find type `Lit` in module `ast`
   --> src/racer/ast_types.rs:153:39
    |
153 |     pub(crate) fn from_lit(lit: &ast::Lit) -> Option<Ty> {
    |                                       ^^^ not found in `ast`
    |
help: consider importing this struct
    |
2   | use rustc_ast::token::Lit;
    |
help: if you import `Lit`, refer to it directly
    |
153 -     pub(crate) fn from_lit(lit: &ast::Lit) -> Option<Ty> {
153 +     pub(crate) fn from_lit(lit: &Lit) -> Option<Ty> {
    |

error[E0532]: expected tuple struct or tuple variant, found unit variant `LitKind::Err`
   --> src/racer/ast_types.rs:168:13
    |
168 |             LitKind::Err(_) => None,
    |             ^^^^^^^^^^^^^^^
   --> /rustc/c6fcdb690609769a240fc8ab0de0ce68d5ea7dba/compiler/rustc_ast/src/ast.rs:1816:5
    |
    = note: `LitKind::Err` defined here
    |
help: use this syntax instead
    |
168 |             LitKind::Err => None,
    |             ~~~~~~~~~~~~
help: consider importing one of these items instead
    |
2   | use core::result::Result::Err;
    |
2   | use std::result::Result::Err;
    |
help: if you import `Err`, refer to it directly
    |
168 -             LitKind::Err(_) => None,
168 +             Err(_) => None,
    |

error[E0277]: the trait bound `DummyEmitter: Translate` is not satisfied
  --> src/racer/ast.rs:25:6
   |
25 | impl Emitter for DummyEmitter {
   |      ^^^^^^^ the trait `Translate` is not implemented for `DummyEmitter`
   |
   = help: the following other types implement trait `Translate`:
             AnnotateSnippetEmitterWriter
             EmitterWriter
             JsonEmitter
             SilentEmitter
note: required by a bound in `Emitter`
  --> /rustc/c6fcdb690609769a240fc8ab0de0ce68d5ea7dba/compiler/rustc_errors/src/emitter.rs:204:1

Some errors have detailed explanations: E0277, E0407, E0412, E0432, E0532.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `racer` due to 6 previous errors
warning: build failed, waiting for other jobs to finish...
@michael-nhat
Copy link

I meet those errors too. But install racer on arch by pacman success.

@rags
Copy link

rags commented Feb 27, 2023

+1 Cant install racer in macos. Any work arounds? I tried both rustup and installing from source

@JayanSmart
Copy link

+1 I too can't install racer on M1 MacOS. I also tried rustup and installing from source with identical results.

@AddictArts
Copy link

+1 Windows, can't install, same issue

@calebcartwright
Copy link
Contributor

Friendly reminder that racer is deprecated, and unsupported

This is also a duplicate of many open and closed issues (#1182, #1181, #1173, #1178, etc.), each of which contains the steps you need to take if you still want to build racer from source (ensure you have a valid nightly toolchain, and use that toolchain to compile; not any arbitrary nightly toolchain)

@Jan-V2
Copy link

Jan-V2 commented Nov 11, 2023

Friendly reminder that racer is deprecated, and unsupported

You should probably put that at the top of the readme, if you had, i wouldn't be here.

@calebcartwright
Copy link
Contributor

Friendly reminder that racer is deprecated, and unsupported

You should probably put that at the top of the readme, if you had, i wouldn't be here.

Well, for starters you're quoting a comment that includes a link to just such information in the project's readme: https://github.com/racer-rust/racer#disclaimer

In case that's still not direct enough, here's the text inline:

Racer is not actively developped now. Please consider using newer software such as rust-analyzer.

But secondly, I'm not a maintainer of this project and I never have been. I was simply trying to help by answering a recurring question since no one else was.

If you think that additional information in the readme would be helpful, then perhaps you'd consider submitting such a PR yourself and trying to get that merged instead of taking these subtle swipes at other users who don't have write access to this project 😄

@f4th4n
Copy link

f4th4n commented Feb 7, 2024

Same here, I want to install RustAutoComplete but it depends on racer.

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

8 participants