-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Opt-in to rustc_private for rust-analyzer
#6869
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @phansch (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
What does this do? |
This tells This should mean that so long as every user has: { "rust-analyzer.rustcSource": "discover" } set, rust-analyzer should just work in this repository. That being said, if you have That is, previous to this change I believe This should obsolete #5803 (and/or the other upstream changes already have done that, and this PR only brings it to your attention). |
This is great 🎉 Unfortunately I have some trouble to get this to work locally. Even though it indexes the rustc crates, it still marks the rustc crates with Here's what I currently have configured in my local Clippy checkout:
|
Let's get this in for now 🎉 We can add some more documentation once a new non-nightly version of rust-analyzer is released. @matthiaskrgr I believe this also means the ra-setup machinery is no longer needed. At least I didn't run that locally and it still resolved the crates correctly. @bors r+ |
📌 Commit c4e2cf9 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Oh that's cool So possibly the old heuristic was not sufficient for clippy, because the sub crates are not actually in the same workspace and instead are used as path dependencies I didn't even consider that as a possibility, but I'm glad it's worked out like that for you <3 |
Thanks a lot for this! This also works great in (neo)vim with (I didn't have to set the update channel in vim, but I guess my setup is a bit different: I use the {
"rust-analyzer.server.path": "rust-analyzer",
} in my config.) My complete rust-analyzer config{
"rust-analyzer.server.path": "rust-analyzer",
"rust-analyzer.checkOnSave.extraArgs": ["--target-dir", "target/rust-analyzer"],
"rust-analyzer.cargo.allFeatures": true,
"rust-analyzer.diagnostics.disabled": ["macro-error", "unresolved-proc-macro"],
"rust-analyzer.rustcSource": "discover",
} The disabled diagnostics made problems when hacking on Clippy. The first appeared on our |
Yeah, this looks like it obsoletes |
My apologies. I can send a reverting PR so you can keep using that if you want 😆 |
rust-lang/rust-analyzer#7891
changelog: none
This will also help priroda and any other package which depends on themiri
library crate.This isn't Miri :p