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

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

Merged
merged 1 commit into from Aug 10, 2022

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.

None yet

2 participants