cargo build --features "X"
doesn't update binary mtime when list of features change
#15313
Labels
A-build-system
Area: build system integration
A-rebuild-detection
Area: rebuild detection and fingerprinting
C-bug
Category: bug
S-needs-design
Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Problem
Cargo doesn't appear to be updating the mtime on the binary in the
./target/debug
directory when grabbing that file from the cache. This is breaking my usingcargo
inside a Makefile because the Makefile believes the built binary is older than it actually is.Steps
Create a repo with the following source
Check the current time
Build the crate with feature a
stat
the built binaryBuild the crate with feature b
stat
the built binary againBuild the crate with feature a again
stat
the built binary againNotice that the "Modify" time is now older than step 5, even though the file on disk has been updated since step "5"
Using the
Makefile
, I can produce the same issue:Possible Solution(s)
No response
Notes
No response
Version
The text was updated successfully, but these errors were encountered: