-
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
Use rust-project.json instead of patching Cargo.toml #5803
Comments
I also faced this problem and fixed it by putting |
Using the rust-project.json will not be necessary once/if rust-lang/rust#76856 lands and the rustc internals are included in the |
rust-lang/rust#76856 landed. Does this mean we can remove the |
Mhh, it seems that We could perhaps use that (and use master toolchain sources) instead of some kind of path to a local repo at least... |
Hm, right now, ra is broke for me anyway, see https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Fixing.20sysroot.20loading |
rust-analyzer works for me. But it doesn't find the rustc source because this isn't implmented in rust-analyzer yet :D Probably needs the same as this: |
I think this issue can be closed. {
"rust-analyzer.rustc.source": "discover",
"rust-analyzer.linkedProjects": [
"./Cargo.toml",
"clippy_dev/Cargo.toml",
"lintcheck/Cargo.toml",
]
} |
Preface
I've noticed that to use rust-analyzer with clippy you need to run
cargo dev ra-setup
, which'll patch existingCargo.toml
for workspace andclippy-lints
.After that it was cumbersome (maybe just for me) to run compile/test because now cargo basically tries to compile parts of the rust.
And of course you need to get rid of those bits before submitting a PR.
Proposal
Nowadays rust-analyzer has a different way to define a project, mostly intended for projects that don't use Cargo. One can write a rust-project.json and point rust-analyzer to that file instead.
Could it be used instead and put into
.gitignore
for example? I think it should be more convenient than current solution.I probably can take the ticket on the next week and try to come with PR.
Main questions (assuming approach works):
ra-setup
or add a feature flag?.vscode
settings and specifyrust-analyzer.linkedProjects
for user?The text was updated successfully, but these errors were encountered: