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

Use x.py check instead of cargo check for build scripts #1384

Merged
merged 1 commit into from
Jul 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/building/suggested.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@ you can write: <!-- date: 2022-04 --><!-- the date comment is for the edition be
"rust-analyzer.procMacro.enable": true,
"rust-analyzer.cargo.buildScripts.enable": true,
"rust-analyzer.cargo.buildScripts.overrideCommand": [
"cargo",
"python3",
jyn514 marked this conversation as resolved.
Show resolved Hide resolved
"x.py",
"check",
"-p",
"rustc_driver",
"--message-format=json"
"--json-output"
],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume RA will append to that the crate it cares about, or so? Because just running this command will check a lot of things^^ The old command specifically passed rustc_driver, so this one could pass "compiler/rustc_driver" or "compiler/rustc" or so?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, but RA just runs this command once for everything. It also avoids actually checking anything using RUSTC_WRAPPER.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RUSTC_WRAPPER isn't supported by x.py.

(Looks like you removed this comment but it still got sent out to everyone via notifications so people only reading the mails will be very confused... deleting comments is not a good idea)

Florian says the opposite here

"rust-analyzer.rustc.source": "./Cargo.toml",
}
Expand Down