-
Notifications
You must be signed in to change notification settings - Fork 510
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
model: set mtime of links to epoch to prevent spurious rebuilds
We want to rebuild the model package when changing variants, but before this change, we rebuild every time. This happens because cargo detects that the timestamps of the variant-sensitive links we create (and that we tell it to watch) don't match its output file. We don't control creation of the output file, so they'll never match. Each rebuild changes the links again, causing another rebuild. This change sets the mtime of the links to epoch, effectively telling cargo that they haven't changed. We still rebuild if the variant changes, or if someone changes the links behind our back, which would result in a different mtime.
- Loading branch information
Showing
3 changed files
with
41 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ url = "2.1" | |
|
||
[build-dependencies] | ||
cargo-readme = "3.1" | ||
filetime = "0.2" | ||
rand = "0.8" | ||
|
||
[lib] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters