Skip to content

hadrian fails to re-generate dependencies when hs-boot files are modified

Steps to reproduce

  1. Check out a clean master. (I was at b8e4fe23.)

  2. Run hadrian/build _bootFileDeps/stage0/libraries/filepath/build/System/OsPath.o -o _bootFileDeps.

  3. Add a silly import Data.ByteString.Builder () to libraries/filepath/System/OsPath.hs-boot.

  4. Run the same command from step 2. This will fail with a message like the following:

    libraries/filepath/System/OsPath.hs-boot:5:1: error:
        Could not find module ‘Data.ByteString.Builder’
        There are files missing in the ‘bytestring-0.11.5.1’ package,
        try running 'ghc-pkg check'.
        Use -v (or `:set -v` in ghci) to see a list of the files searched for.
      |
    5 | import Data.ByteString.Builder ()
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  5. Delete _bootFileDeps/stage0/libraries/filepath/.dependencies.mk.

  6. Run the same command from step 2. Now it succeeds again.

Expected behavior

Hadrian should not use stale .dependencies* information.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information