-
Notifications
You must be signed in to change notification settings - Fork 167
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
Add more cargo:rerun-if-env-changed
's to build.rs
#544
Conversation
Add more `cargo:rerun-if-env-changed`'s to build.rs for rustix's features, configuration flags, and the toolchain variables rustix uses for autoconfiguration, to hopefully ensure it gets rerun when anything changes. See also #526.
println!("cargo:rerun-if-env-changed=CARGO_FEATURE_ALL_IMPLS"); | ||
println!("cargo:rerun-if-env-changed=CARGO_CFG_MIRI"); | ||
println!("cargo:rerun-if-env-changed=CARGO_ENCODED_RUSTFLAGS"); | ||
println!("cargo:rerun-if-env-changed=RUSTC"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would expect just this line to fix the issue, but having more rerun
directives won't hurt anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That might be true. I've now scaled back the list a little to exclude all the cargo features, because those seem less likely to be the problem here, and are more tedious to maintain. Hopefully this works!
* Add more `cargo:rerun-if-env-changed`'s to build.rs Add more `cargo:rerun-if-env-changed`'s to build.rs for rustix's features, configuration flags, and the toolchain variables rustix uses for autoconfiguration, to hopefully ensure it gets rerun when anything changes. See also #526. * Don't include all the cargo features.
* Add more `cargo:rerun-if-env-changed`'s to build.rs Add more `cargo:rerun-if-env-changed`'s to build.rs for rustix's features, configuration flags, and the toolchain variables rustix uses for autoconfiguration, to hopefully ensure it gets rerun when anything changes. See also #526. * Don't include all the cargo features.
After updating our dependencies, running `cargo build-dev` always trigger the recompilation of a few dependencies as well as `kani-driver` and `kani-compiler`. This seems to be caused by [this change](bytecodealliance/rustix#544) on `rustix` dependency. The problem here is that we share the same build folder for our tools and our binaries. But they build with slightly different cargo arguments, and this package decided to make their build script very sensitive to changes to their environment To overcome this, force `cargo build-dev` to use a different folder for the tools build.
After updating our dependencies, running `cargo build-dev` always trigger the recompilation of a few dependencies as well as `kani-driver` and `kani-compiler`. This seems to be caused by [this change](bytecodealliance/rustix#544) on `rustix` dependency. The problem here is that we share the same build folder for our tools and our binaries. But they build with slightly different cargo arguments, and this package decided to make their build script very sensitive to changes to their environment To overcome this, force `cargo build-dev` to use a different folder for the tools build.
println!("cargo:rerun-if-env-changed=CARGO_ENCODED_RUSTFLAGS"); | ||
println!("cargo:rerun-if-env-changed=RUSTC"); | ||
println!("cargo:rerun-if-env-changed=TARGET"); | ||
println!("cargo:rerun-if-env-changed=CARGO_RUSTC_WRAPPER"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like CARGO_RUSTC_WRAPPER
is a wrong name. Could you please change it to the proper RUSTC_WRAPPER
?
For reference: dtolnay/anyhow#248
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! I've now submitted #563 to fix that.
Similar to dtolnay/anyhow#248, and as suggested [here], check `RUSTC_WRAPPER` instead of `CARGO_RUSTC_WRAPPER`. [here]: #544 (comment)
Similar to dtolnay/anyhow#248, and as suggested [here], check `RUSTC_WRAPPER` instead of `CARGO_RUSTC_WRAPPER`. [here]: #544 (comment)
Similar to dtolnay/anyhow#248, and as suggested [here], check `RUSTC_WRAPPER` instead of `CARGO_RUSTC_WRAPPER`. [here]: bytecodealliance/rustix#544 (comment)
Similar to dtolnay/anyhow#248, and as suggested [here], check `RUSTC_WRAPPER` instead of `CARGO_RUSTC_WRAPPER`. [here]: bytecodealliance/rustix#544 (comment)
Similar to dtolnay/anyhow#248, and as suggested [here], check `RUSTC_WRAPPER` instead of `CARGO_RUSTC_WRAPPER`. [here]: bytecodealliance/rustix#544 (comment)
Similar to dtolnay/anyhow#248, and as suggested [here], check `RUSTC_WRAPPER` instead of `CARGO_RUSTC_WRAPPER`. [here]: #544 (comment)
Similar to dtolnay/anyhow#248, and as suggested [here], check `RUSTC_WRAPPER` instead of `CARGO_RUSTC_WRAPPER`. [here]: bytecodealliance/rustix#544 (comment)
Similar to dtolnay/anyhow#248, and as suggested [here], check `RUSTC_WRAPPER` instead of `CARGO_RUSTC_WRAPPER`. [here]: bytecodealliance/rustix#544 (comment)
Similar to dtolnay/anyhow#248, and as suggested [here], check `RUSTC_WRAPPER` instead of `CARGO_RUSTC_WRAPPER`. [here]: #544 (comment)
Similar to dtolnay/anyhow#248, and as suggested [here], check `RUSTC_WRAPPER` instead of `CARGO_RUSTC_WRAPPER`. [here]: bytecodealliance/rustix#544 (comment)
Similar to dtolnay/anyhow#248, and as suggested [here], check `RUSTC_WRAPPER` instead of `CARGO_RUSTC_WRAPPER`. [here]: #544 (comment)
* Add more `cargo:rerun-if-env-changed`'s to build.rs Add more `cargo:rerun-if-env-changed`'s to build.rs for rustix's features, configuration flags, and the toolchain variables rustix uses for autoconfiguration, to hopefully ensure it gets rerun when anything changes. See also #526. * Don't include all the cargo features.
Similar to dtolnay/anyhow#248, and as suggested [here], check `RUSTC_WRAPPER` instead of `CARGO_RUSTC_WRAPPER`. [here]: #544 (comment)
* Add more `cargo:rerun-if-env-changed`'s to build.rs Add more `cargo:rerun-if-env-changed`'s to build.rs for rustix's features, configuration flags, and the toolchain variables rustix uses for autoconfiguration, to hopefully ensure it gets rerun when anything changes. See also #526. * Don't include all the cargo features.
Similar to dtolnay/anyhow#248, and as suggested [here], check `RUSTC_WRAPPER` instead of `CARGO_RUSTC_WRAPPER`. [here]: #544 (comment)
* Add more `cargo:rerun-if-env-changed`'s to build.rs Add more `cargo:rerun-if-env-changed`'s to build.rs for rustix's features, configuration flags, and the toolchain variables rustix uses for autoconfiguration, to hopefully ensure it gets rerun when anything changes. See also #526. * Don't include all the cargo features.
Similar to dtolnay/anyhow#248, and as suggested [here], check `RUSTC_WRAPPER` instead of `CARGO_RUSTC_WRAPPER`. [here]: #544 (comment)
* Add more `cargo:rerun-if-env-changed`'s to build.rs Add more `cargo:rerun-if-env-changed`'s to build.rs for rustix's features, configuration flags, and the toolchain variables rustix uses for autoconfiguration, to hopefully ensure it gets rerun when anything changes. See also #526. * Don't include all the cargo features.
Similar to dtolnay/anyhow#248, and as suggested [here], check `RUSTC_WRAPPER` instead of `CARGO_RUSTC_WRAPPER`. [here]: #544 (comment)
Add more
cargo:rerun-if-env-changed
's to build.rs for rustix's features, configuration flags, and the toolchain variables rustix uses for autoconfiguration, to hopefully ensure it gets rerun when anything changes.See also #526.