-
Notifications
You must be signed in to change notification settings - Fork 2.9k
cargo:rerun-if-env-changed doesn't work with env configuration #10358
Copy link
Copy link
Closed
Labels
A-build-scriptsArea: build.rs scriptsArea: build.rs scriptsA-environment-variablesArea: environment variablesArea: environment variablesA-rebuild-detectionArea: rebuild detection and fingerprintingArea: rebuild detection and fingerprintingC-bugCategory: bugCategory: bugS-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Metadata
Metadata
Assignees
Labels
A-build-scriptsArea: build.rs scriptsArea: build.rs scriptsA-environment-variablesArea: environment variablesArea: environment variablesA-rebuild-detectionArea: rebuild detection and fingerprintingArea: rebuild detection and fingerprintingC-bugCategory: bugCategory: bugS-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Problem
When a
build.rsscript emitscargo:rerun-if-env-changed, it is not re-run when the value of the specified variable is changed via theenvconfiguration.Steps
build.rs:.cargo/config.toml:cargo build, it succeeds..cargo/config.tomlto this:cargo buildagain, and it uses the cached build and succeeds. It should runbuild.rsagain, and it should fail.Workaround
FOO=bar cargo build, ignore the result.cargo buildagain, now it runsbuild.rswithFOO=badfrom the config and fails as expected.Possible Solution(s)
No response
Notes
No response
Version