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

Check RUSTC_WRAPPER instead of CARGO_RUSTC_WRAPPER. #563

Merged
merged 4 commits into from
Mar 18, 2023

Conversation

sunfishcode
Copy link
Member

Similar to dtolnay/anyhow#248, and as suggested here, check RUSTC_WRAPPER instead of CARGO_RUSTC_WRAPPER.

@sunfishcode sunfishcode force-pushed the sunfishcode/rustc-wrapper-env-var branch from eae7469 to 3762e1a Compare March 18, 2023 16:38
@sunfishcode sunfishcode force-pushed the sunfishcode/rustc-wrapper-env-var branch 4 times, most recently from a079192 to 80e54c5 Compare March 18, 2023 18:00
io-lifetimes 1.0.7 has a dependency on hermit-abi which doesn't affect
normal builds but does affect cargo tree, which is used in some of
rustix's tests.
@sunfishcode sunfishcode force-pushed the sunfishcode/rustc-wrapper-env-var branch from 80e54c5 to c3d5e81 Compare March 18, 2023 18:06
@sunfishcode sunfishcode merged commit 48d37ce into main Mar 18, 2023
@sunfishcode sunfishcode deleted the sunfishcode/rustc-wrapper-env-var branch March 18, 2023 18:24
@aldanor
Copy link

aldanor commented Mar 18, 2023

@sunfishcode Would it be worth pushing a new crate version with this?

@sunfishcode
Copy link
Member Author

I've now released 0.37.2 and 0.36.10 with this fix.

sunfishcode added a commit that referenced this pull request Mar 29, 2023
Now that we appear to have a known-working fix for #526, we can
investigate relaxing the fix. If #526 reappears, we now have a
known-working state we can quickly revert to.

Reports in #562 and #575 are that having rerun-if-env-changed=RUSTC
and rerun-if-env-changed=RUSTC_WRAPPER are triggering spurious rebuilds
in some situations, so remove these. In theory, cargo should already be
aware of these environment variables. In practice, there were reports of
build failures which had the appearance of using an older version of
rustc with build.rs output from a newer version of rustc, and it wasn't
clear what was happening. But, it's possible that #563 fixes the issue
properly. So let's try removing these rerun-if-env-changed lines, and
see if the problem resurfaces.

And, rerun-if-env-changed=TARGET is explicitly documented as being
unnecessary [here].

[here]: https://doc.rust-lang.org/cargo/reference/build-scripts.html
sunfishcode added a commit that referenced this pull request Mar 29, 2023
Now that we appear to have a known-working fix for #526, we can
investigate relaxing the fix. If #526 reappears, we now have a
known-working state we can quickly revert to.

Reports in #562 and #575 are that having rerun-if-env-changed=RUSTC
and rerun-if-env-changed=RUSTC_WRAPPER are triggering spurious rebuilds
in some situations, so remove these. In theory, cargo should already be
aware of these environment variables. In practice, there were reports of
build failures which had the appearance of using an older version of
rustc with build.rs output from a newer version of rustc, and it wasn't
clear what was happening. But, it's possible that #563 fixes the issue
properly. So let's try removing these rerun-if-env-changed lines, and
see if the problem resurfaces.

And, rerun-if-env-changed=TARGET is explicitly documented as being
unnecessary [here].

[here]: https://doc.rust-lang.org/cargo/reference/build-scripts.html
sunfishcode added a commit that referenced this pull request May 19, 2023
Now that we appear to have a known-working fix for #526, we can
investigate relaxing the fix. If #526 reappears, we now have a
known-working state we can quickly revert to.

Reports in #562 and #575 are that having rerun-if-env-changed=RUSTC
and rerun-if-env-changed=RUSTC_WRAPPER are triggering spurious rebuilds
in some situations, so remove these. In theory, cargo should already be
aware of these environment variables. In practice, there were reports of
build failures which had the appearance of using an older version of
rustc with build.rs output from a newer version of rustc, and it wasn't
clear what was happening. But, it's possible that #563 fixes the issue
properly. So let's try removing these rerun-if-env-changed lines, and
see if the problem resurfaces.

And, rerun-if-env-changed=TARGET is explicitly documented as being
unnecessary [here].

[here]: https://doc.rust-lang.org/cargo/reference/build-scripts.html
sunfishcode added a commit that referenced this pull request May 19, 2023
Now that we appear to have a known-working fix for #526, we can
investigate relaxing the fix. If #526 reappears, we now have a
known-working state we can quickly revert to.

Reports in #562 and #575 are that having rerun-if-env-changed=RUSTC
and rerun-if-env-changed=RUSTC_WRAPPER are triggering spurious rebuilds
in some situations, so remove these. In theory, cargo should already be
aware of these environment variables. In practice, there were reports of
build failures which had the appearance of using an older version of
rustc with build.rs output from a newer version of rustc, and it wasn't
clear what was happening. But, it's possible that #563 fixes the issue
properly. So let's try removing these rerun-if-env-changed lines, and
see if the problem resurfaces.

And, rerun-if-env-changed=TARGET is explicitly documented as being
unnecessary [here].

[here]: https://doc.rust-lang.org/cargo/reference/build-scripts.html
sunfishcode added a commit that referenced this pull request Oct 12, 2023
Now that we appear to have a known-working fix for #526, we can
investigate relaxing the fix. If #526 reappears, we now have a
known-working state we can quickly revert to.

Reports in #562 and #575 are that having rerun-if-env-changed=RUSTC
and rerun-if-env-changed=RUSTC_WRAPPER are triggering spurious rebuilds
in some situations, so remove these. In theory, cargo should already be
aware of these environment variables. In practice, there were reports of
build failures which had the appearance of using an older version of
rustc with build.rs output from a newer version of rustc, and it wasn't
clear what was happening. But, it's possible that #563 fixes the issue
properly. So let's try removing these rerun-if-env-changed lines, and
see if the problem resurfaces.

And, rerun-if-env-changed=TARGET is explicitly documented as being
unnecessary [here].

[here]: https://doc.rust-lang.org/cargo/reference/build-scripts.html
sunfishcode added a commit that referenced this pull request Oct 12, 2023
Now that we appear to have a known-working fix for #526, we can
investigate relaxing the fix. If #526 reappears, we now have a
known-working state we can quickly revert to.

Reports in #562 and #575 are that having rerun-if-env-changed=RUSTC
and rerun-if-env-changed=RUSTC_WRAPPER are triggering spurious rebuilds
in some situations, so remove these. In theory, cargo should already be
aware of these environment variables. In practice, there were reports of
build failures which had the appearance of using an older version of
rustc with build.rs output from a newer version of rustc, and it wasn't
clear what was happening. But, it's possible that #563 fixes the issue
properly. So let's try removing these rerun-if-env-changed lines, and
see if the problem resurfaces.

And, rerun-if-env-changed=TARGET is explicitly documented as being
unnecessary [here].

[here]: https://doc.rust-lang.org/cargo/reference/build-scripts.html
sunfishcode added a commit that referenced this pull request Oct 12, 2023
Now that we appear to have a known-working fix for #526, we can
investigate relaxing the fix. If #526 reappears, we now have a
known-working state we can quickly revert to.

Reports in #562 and #575 are that having rerun-if-env-changed=RUSTC
and rerun-if-env-changed=RUSTC_WRAPPER are triggering spurious rebuilds
in some situations, so remove these. In theory, cargo should already be
aware of these environment variables. In practice, there were reports of
build failures which had the appearance of using an older version of
rustc with build.rs output from a newer version of rustc, and it wasn't
clear what was happening. But, it's possible that #563 fixes the issue
properly. So let's try removing these rerun-if-env-changed lines, and
see if the problem resurfaces.

And, rerun-if-env-changed=TARGET is explicitly documented as being
unnecessary [here].

[here]: https://doc.rust-lang.org/cargo/reference/build-scripts.html
sunfishcode added a commit that referenced this pull request Oct 12, 2023
Now that we appear to have a known-working fix for #526, we can
investigate relaxing the fix. If #526 reappears, we now have a
known-working state we can quickly revert to.

Reports in #562 and #575 are that having rerun-if-env-changed=RUSTC
and rerun-if-env-changed=RUSTC_WRAPPER are triggering spurious rebuilds
in some situations, so remove these. In theory, cargo should already be
aware of these environment variables. In practice, there were reports of
build failures which had the appearance of using an older version of
rustc with build.rs output from a newer version of rustc, and it wasn't
clear what was happening. But, it's possible that #563 fixes the issue
properly. So let's try removing these rerun-if-env-changed lines, and
see if the problem resurfaces.

And, rerun-if-env-changed=TARGET is explicitly documented as being
unnecessary [here].

[here]: https://doc.rust-lang.org/cargo/reference/build-scripts.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants