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

RA picking stable v nightly errors in dependencies #4271

Closed
kubkon opened this issue May 2, 2020 · 10 comments
Closed

RA picking stable v nightly errors in dependencies #4271

kubkon opened this issue May 2, 2020 · 10 comments

Comments

@kubkon
Copy link

kubkon commented May 2, 2020

Apologies if this is a duplicate, but I couldn't find a matching issue.

Description:

I'm not sure whether this is as intended, but I'm currently seeing a lot of errors of this type:

/Users/kubkon/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/dynasm-0.5.2/src/lib.rs:1:1 Error [rustc E0554] `#![feature]` may not be used on the stable release channel

For the record, with RLS I've actually never experienced this problem.

Setup:

Some setup info:

  • NeoVim + neoclide
  • RA with nightly updates

Oh, and here's the repo I've experienced this in: wasmtime.

cc @bjorn3 are you seeing this as well by any chance?

@kubkon
Copy link
Author

kubkon commented May 2, 2020

Oh, and I should probably add that often these are the only errors I see, which hide other, actual errors in the crate(s).

@bjorn3
Copy link
Member

bjorn3 commented May 2, 2020

I haven't ever seen this. How did you switch to the nightly channel? Did you use rustup override, the rust-toolchain file or something else? I currently use rust-toolchain, but back when I used rustup override, I don't think I have seen it either.

@kubkon
Copy link
Author

kubkon commented May 2, 2020

That's the thing, I'm working exclusively on stable channel.

@bjorn3
Copy link
Member

bjorn3 commented May 2, 2020

Did you enable allFeatures? The lightbeam feature of wasmtime requires nightly.

@kubkon
Copy link
Author

kubkon commented May 2, 2020

Ah, lightbeam, of course! So turning allFeatures off almost did it, thanks! I'm still seeing the same error for staticvec though, which is weird given that it should only be pulled by lightbeam, and with allFeatures set to false, I'm not sure why it ends up in the error list. 🤷

@matklad
Copy link
Member

matklad commented May 4, 2020

Not sure what's the exact issue here, but it looks like something activates all/default features, which seems unrelated to rust-analyzer.

@matklad matklad closed this as completed May 4, 2020
@bjorn3
Copy link
Member

bjorn3 commented May 4, 2020

I think this is because of the --workspace that rust analyzer automatically passes. It worked fine for me with "rust-analyzer.checkOnSave.overrideCommand": ["cargo", "check", "--message-format=json", "-p", "wasmtime"].

@kubkon
Copy link
Author

kubkon commented May 5, 2020

I can confirm that @bjorn3's suggested solution worked. @matklad question though, is that then the intended behaviour?

@matklad
Copy link
Member

matklad commented May 5, 2020

That's intended behavior from rust-analyzer side, but it can be considered a bug ("the" bug) in Cargo. It's being worked on in rust-lang/cargo#7820

@kubkon
Copy link
Author

kubkon commented May 5, 2020

Ah cool, makes sense! Thanks for the link!

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

3 participants