-
Notifications
You must be signed in to change notification settings - Fork 121
Don't persist failure to the database #428
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
Comments
Note that you have to conservatively assume that failures aren't in the DB since the "failure" might be This issue is also discussed at haskell/cabal#3179. |
Let's say the failure is due to a syntax error. In this case, rebuilding is futile until the input files change. Persisting failures (in a structure similar to Result) would stop further builds until the offending syntax is fixed, which would be useful for continuous recompilation (#371). ShakeException would need to be serializable; would anything be lost with |
Often the failures are due to untracked assumptions, e.g. ghc version, and rebuilding without changing the input files is desirable. I imagine for continuous recompilation you'd want to wait until something relevant changed, so there you have no need to serialise something like ShakeException - you only care if something relevant changed, not what the last result was. |
Now implemented, note that this changes the invariants. Previously if you had a rule which claimed to produce
And this would work. There was an invariant that if you ever start running a rule then that rule is dirty until the rule has completed. Now, if the child ends up in an erroneous state, the parent might be started, cancelled, then skipped. Certainly a corner case, so hopefully nothing anyone ever wanders in to. |
Currently I store failures in the database by marking them explicitly as missing. I see no reason for storing failures since it defeats previous value equality and this can cause huge rebuilds even if nothing changes.
The text was updated successfully, but these errors were encountered: