You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
ghost
changed the title
build.rs cached output is not updated after src/main.rs changed, when using cargo:rerun-if-env-changed
build.rs is not run after src/main.rs changed, when using cargo:rerun-if-env-changed
Jan 5, 2018
I made this simple project illustrate the issue: https://github.com/xftroxgpx/buildrs_not_updated
(just run
./go
)In simple terms:
touch src/main.rs
cargo build
will not recompile
build.rs
because it usedcargo:rerun-if-env-changed
(doc)thus
src/main.rs
will use stalebuild.rs
...../output
!cargo:rerun-if-env-changed
that recompiles
build.rs
every time you do step 4. now.tested two versions of cargo:
cargo 0.26.0
release: 0.26.0
and
cargo 0.25.0-nightly (a88fbac 2017-12-29)
release: 0.25.0
commit-hash: a88fbac
commit-date: 2017-12-29
with rust:
rustc 1.24.0-dev (687d3d15b 2018-01-02)
binary: rustc
commit-hash: 687d3d15ba726dbb1ac6b85223ebe0e98c6820cc
commit-date: 2018-01-02
host: x86_64-unknown-linux-gnu
release: 1.24.0-dev
LLVM version: 4.0
The text was updated successfully, but these errors were encountered: