rules_haskell icon indicating copy to clipboard operation
rules_haskell copied to clipboard

Haddock 2.30 faillure in profiling mode

Open ylecornec opened this issue 1 year ago • 0 comments

It seems that haddock 2.30 which comes with ghc 9.8.1 now requires .hi interface files as input.

See https://github.com/haskell/haddock/blob/ghc-9.8/doc/invoking.rst#avoiding-recompilation

This is a problem when profiling is enabled since only p_hi files are present in the sandbox in this case.

To Reproduce

The following command fails on the ylecornec/ghc_9_8_1 branch (at least with a nix provided ghc).

$ cd rules_haskell_test && GHC_VERSION=9.8.1 bazel build -c dbg //tests:toto
Failed to load interface for ‘LZ4’
  • If we copy a non profiling lz4.hi file to the sandbox next to lz4.p_hi the build is successful
  • If we change the extension of profiled interface files from p_hi to hi the file is found by haddock but there is a different error:
    Exception when reading interface file  bazel-out/k8-dbg/bin/tests/testsZSlz4/_iface/LZ4.hi
      mismatched interface file profile tag (wanted "", got "p")
    

ylecornec avatar Feb 21 '24 11:02 ylecornec