Closed duog closed 6 years ago
@duog Thanks for the report.
hadrian/build.sh clean
did not fix it.
Do you mean Hadrian failed with the same error when run with the clean
target? If yes, this looks like a general Shake issue. Shake should be able to deal with an outdated database more gracefully.
@ndmitchell Do you agree this is a Shake issue or is there a simple workaround we can add to Hadrian?
Shake should deal with a corrupted database more gracefully... it might need a seq somewhere to force database reading errors to occur correctly.
I added a seq and a bunch of tests. In particular 397539066a0acd6d4d6558028559147eed5a0e53 fixes the bug, while 7c9b7623eca4a1680b32715d849c13b5b59da102 tests all the places binary serialisation could go wrong, and critically checks that a top-level phony
will still run in all cases (so clean
works). Will be in the next Shake release, although doesn't seem critical at the moment.
Awesome, thanks @ndmitchell!
I accidentally tried to build ghc with a four month old version of hadrian.
Realising my mistake, I updated the source and build again, and was confronted by this error:
hadrian/build.sh clean
did not fix it. removing _build did fix it.