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
Lint error with also files and digest+modtime checking #427
Comments
I think there's a third solution:
|
@Mathnerd314 - yes, that works too. In fact, I originally had that as the lint checking function, but there are a few bugs you can introduce that don't get caught by that lesser check - can't remember what off the top of my head but I'll try and remember. |
In fact checking the stored value after may be a performance win anyway. |
As per #453, if checking the stored value after is valid then the builtin rule should take a My mild concern is that if you change the rules of |
If the rules change, Shake needs to discard the old result and its stored dependencies regardless (see #446). Doing dependencies first also disallows "unstable" rules that use different files depending on the phase of the moon, but I don't see that as a loss (instead, you depend on a separate "phase of the moon" rule first). Were the bugs with EqualCheap vs. EqualExpensive found around dad4f85 and d073276? |
OK, I'm convinced, stored value should be checked at the end of all the dependencies, not the beginning. Allowing rules on the phase of the moon should be explicit (although I do worry about Werewolf exceptions 😃). Yep, those do look like the bugs I must have found. |
Solved by pushing the stored value check to after the dependencies have been checked. |
In fact, looking at the code, I don't see how this can't have broken |
… fails, another instances of #427
Given the test suite fragment:
The run:
Will fail with a lint error. The sequence of events the second time is:
rewrite1
and determine the file has not changed modtime or hash, but that I depend onrewrite1 rewrite2
.rewrite1 rewrite2
and determine the files have not changed modtime or hash, but that I depend onalwaysRerun
which has changed.rewrite1 rewrite2
which updates both files in their modtime but not hash, so I report that neither file has changed.rewrite1
has not changed and continue.This bug is reduced down from snowleopard/hadrian#206
Two possible solutions:
The text was updated successfully, but these errors were encountered: