Skip to content

Comments

Work around RA's RUSTC_WRAPPER poisoning all subsequent command-line builds#252

Merged
dtolnay merged 1 commit intomasterfrom
rerun
Aug 10, 2022
Merged

Work around RA's RUSTC_WRAPPER poisoning all subsequent command-line builds#252
dtolnay merged 1 commit intomasterfrom
rerun

Conversation

@dtolnay
Copy link
Owner

@dtolnay dtolnay commented Aug 10, 2022

Previously if someone did a build via rust-analyzer, it would run anyhow's build script through rust-analyzer's questionable RUSTC_WRAPPER (#250), and then future cargo invocations done on the command line not via rust-analyzer would bypass the build script, until cargo clean or the target dir being deleted.

This PR is an alternative to #251 that tries to isolate command-line cargo builds from getting poisoned by rust-analyzer's running of the build script and cargo's caching of the build script output. In contrast to #251, this does not attempt to fix builds done through rust-analyzer, only direct cargo invocations. I still consider rust-analyzer's behavior incorrect so I want to not sweep it under the rug; getting that fixed in rust-analyzer will be between the rust-analyzer devs and its users.

@dtolnay dtolnay merged commit 6e6af39 into master Aug 10, 2022
@dtolnay dtolnay deleted the rerun branch August 10, 2022 23:45
@ErichDonGubler
Copy link

CC @matklad.

@dtolnay
Copy link
Owner Author

dtolnay commented Aug 11, 2022

I am also working on a Cargo PR to make this the default behavior in Cargo i.e. include RUSTC_WRAPPER in the fingerprint used for deciding whether to rerun every build script, as is already done for RUSTC and various other important environment details.

Repository owner locked and limited conversation to collaborators Nov 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants