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

Include Cargo rustc configuration in probe #157

Merged
merged 1 commit into from Aug 14, 2021
Merged

Conversation

jonhoo
Copy link
Sponsor Contributor

@jonhoo jonhoo commented Jun 18, 2021

Without this, environments that configure RUSTFLAGS or the RUSTC_WRAPPER in ways that break compilation with backtrace will fail to compile anyhow (see #156).

With this, the compiler probe takes into account that Cargo configuration, and thus (more) accurately represents whether the backtrace feature can be safely enabled.

Tested using the problematic configuration from #156 with the Cargo fix from rust-lang/cargo#9601, and anyhow correctly decides not to enable backtrace and thus compiles.

Requires rust-lang/cargo#9601, but does not break without.

Fixes #156.

@jonhoo
Copy link
Sponsor Contributor Author

jonhoo commented Aug 13, 2021

Updated to reflect the change that landed in rust-lang/cargo#9601. Have confirmed that this fixes the problem when using nightly cargo.

Without this, environments that configure `RUSTFLAGS` or the
`RUSTC_WRAPPER` in ways that break compilation with `backtrace` will
fail to compile anyhow (see dtolnay#156).

With this, the compiler probe takes into account that Cargo
configuration, and thus (more) accurately represents whether the
`backtrace` feature can be safely enabled.

Requires rust-lang/cargo#9601, but does not break without.

Fixes dtolnay#156.
@jonhoo
Copy link
Sponsor Contributor Author

jonhoo commented Aug 13, 2021

You may need to kick CI again — I missed a case that caused nightly builds where RUSTFLAGS was empty to fail, and GitHub Actions doesn't remember the CI approval.

Copy link
Owner

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

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

Thanks!

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.

Compile probe does not take Cargo rustc configuration into account
2 participants