Nondeterministic build failures
Summary
When switching back and forth between a patch I've been working on and its base commit, I encounter situations where the same code produces different build outcomes before and after switching. Specifically, the base commit, which built cleanly before I started working on the patch, fails to build after attempting to build the patch and then reverting back to the base commit.
Steps to reproduce
(Note that I am writing this down from memory; actually executing these steps takes several hours)
- Clone the repo at https://gitlab.haskell.org/tdammers/ghc/
- Check out the base commit bb141114
- Build with hadrian:
./boot && ./configure && ./hadrian/build.sh -j2
, leaving everything at defaults. This should build cleanly. - Check out the patch commit 55de5938, verifying that only
compiler/coreSyn/CoreOpt.hs
is changed. - Do an incremental build:
./hadrian/build.sh -j2
. This should fail with a panic (the patch breaks things, this is what I'm trying to figure out in the first place) - Check out the base commit bb141114
- Run another incremental build:
./hadrian/build.sh -j2
. This fails with the same panic as the build in step 5.
Expected behavior
The build in step 7 should succeed (just like the one in step 3).
Environment
-
GHC version used: 8.6.5
-
Operating System: Debian GNU/Linux
-
System Architecture: x64