-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Include build script execution in the fingerprint. #6720
Conversation
r? @nrc (rust_highfive has picked a reviewer for you, use r? to override) |
@bors: r+ Thanks again for diagnosing this! |
📌 Commit 035913f has been approved by |
⌛ Testing commit 035913f with merge 57d2cac8444f7352dc0667131d343953d5c0514f... |
💔 Test failed - checks-travis |
@bors retry |
⌛ Testing commit 035913f with merge 3a13c482526b97c8826263b8a8b56e98fbc3fd7c... |
💔 Test failed - checks-travis |
@bors retry |
Include build script execution in the fingerprint. This adds information about the execution of a build script to the fingerprint. Previously, no information was included, and cargo relied on dirty propagation in `JobQueue` to trigger recompiles. However, if two separate targets are built via separate commands (such as `cargo build` then `cargo test`), the second command did not know that the build script was updated, and thus was incorrectly treated as "fresh". This works by including the timestamp of the last time the build script was ran in the fingerprint. For overridden build scripts, it includes the replaced output. Fixes #4979
☀️ Test successful - checks-travis, status-appveyor |
Update cargo, rls, books ## cargo 10 commits in 5c6aa46e6f28661270979696e7b4c2f0dff8628f..95b45eca19ac785263fed98ecefe540bb47337ac 2019-02-22 19:32:35 +0000 to 2019-03-06 19:24:30 +0000 - Relax some rustdoc tests. (rust-lang/cargo#6721) - Include build script execution in the fingerprint. (rust-lang/cargo#6720) - part of the infrastructure for public & private dependencies in the resolver (rust-lang/cargo#6653) - Bump to 0.36.0 (rust-lang/cargo#6718) - Some test/bench-related tweaks (rust-lang/cargo#6707) - Fix links to the permanent home of the edition guide. (rust-lang/cargo#6703) - HTTPS all the things (rust-lang/cargo#6614) - Cargo test quicker by not building untested examples when filtered (rust-lang/cargo#6683) - Link from ARCHITECTURE.md to docs.rs and github (rust-lang/cargo#6695) - Update how to install rustfmt (rust-lang/cargo#6696) ## rls 9 commits in 0d6f53e1a4adbaf7d83cdc0cb54720203fcb522e..6a1b5a9cfda2ae19372e0613e76ebefba36edcf5 2019-02-14 07:52:15 +0000 to 2019-03-04 20:24:45 +0000 - Update cargo and clippy. (rust-lang/rls#1388) - catch up rust-lang/rust PR#58321 (rust-lang/rls#1384) - Apply Clippy fixes (rust-lang/rls#1327) - Various cosmetic improvements (rust-lang/rls#1326) - Make test `RlsHandle` transport-agnostic (rust-lang/rls#1317) - Translate remaining tests (rust-lang/rls#1320) - Remove unnecessary #![feature]s (rust-lang/rls#1323) - Update Clippy (rust-lang/rls#1319) - Update Clippy (rust-lang/rls#1315) cc @Xanewok ## Books See #58936 for details.
Fingerprint build script deps only for path packages. #6720 introduced some protection that if there is a build script, and two commands are used (such as `cargo build` then `cargo test`), the second command would correctly get rebuilt. However, the way it was implemented relies on mtimes working correctly. A common use case is to cache built dependencies in Docker, and Docker zeros the nanoseconds from mtime when the image is saved. This caused all packages that had build scripts to get rebuilt when the Docker image runs. The solution here is to only use the #6720 protection for local (path) packages. This runs under the assumption that mtimes need to work for those anyways. The consequence is that the scenario in #6720 will no longer work for detecting changes in registry dependencies with build scripts. Fixing that final edge case is nontrivial. Since it is unlikely to happen often, I figure this workaround should be sufficient for now. cc rust-lang/rust-playground#469 cc rust-lang/rust#59061
This adds information about the execution of a build script to the fingerprint. Previously, no information was included, and cargo relied on dirty propagation in
JobQueue
to trigger recompiles. However, if two separate targets are built via separate commands (such ascargo build
thencargo test
), the second command did not know that the build script was updated, and thus was incorrectly treated as "fresh".This works by including the timestamp of the last time the build script was ran in the fingerprint. For overridden build scripts, it includes the replaced output.
Fixes #4979