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

fix: ensure test contract compile without warnings #6878

Merged
merged 2 commits into from
May 25, 2022

Conversation

matklad
Copy link
Contributor

@matklad matklad commented May 25, 2022

This fixes make release failing

@matklad matklad requested a review from a team as a code owner May 25, 2022 08:05
@matklad matklad requested a review from nikurt May 25, 2022 08:05
Make sure all of RUSTFLAGS, CARGO_ENCODED_RUSTFLAGS and
CARGO_BUILD_RUSTFLAGS are not leaked. The latter is set by our Makefile,
to also honor our `.cargo/config` build flags.
@@ -43,10 +43,15 @@ fn build_contract(dir: &str, args: &[&str], output: &str) -> Result<(), Error> {

fn cargo_build_cmd(target_dir: &Path) -> Command {
let mut res = Command::new("cargo");
res.env_remove("RUSTFLAGS");

res.env_remove("CARGO_BUILD_RUSTFLAGS");
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this needed? Which flags other than -Dwarnings are being removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't strictly speaking need this I think, but this is sort-of defense in depth, to make the build mode isolated in the face of unforeseen future changes.

@near-bulldozer near-bulldozer bot merged commit a5203d7 into near:master May 25, 2022
@matklad matklad deleted the m/no-warnings branch May 25, 2022 10:12
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.

2 participants