Description
Describe the bug
Autogenerated Paths_ modules are failing to compile
../../../bazel-out/k8-fastbuild/bin/external/stackage/regex-base-0.94.0.2/regex-base-0.94.0.2/build/autogen/Paths_regex_base.hs:48:17: error:
Variable not in scope: splitFileName :: FilePath -> (a, b0)
|
48 | let (dir,_) = splitFileName exePath
| ^^^^^^^^^^^^^
../../../bazel-out/k8-fastbuild/bin/external/stackage/regex-base-0.94.0.2/regex-base-0.94.0.2/build/autogen/Paths_regex_base.hs:49:16: error:
Variable not in scope: minusFileName :: t0 -> String -> String
|
49 | return ((dir `minusFileName` "bin") `joinFileName` dirRel)
To Reproduce
This started happening when we tried to upgrade from a nightly
snapshot from mid July to lts-20.1
. We know we had to downgrade to GHC 9.2.4, that doesn't appear to be a problem. We've upgraded NixPkgs, Bazel, rules_haskell, anything we can think of, but the problem keeps reoccuring. It's not just regex-base as above; it's also happening with transformers-compat, unliftio-core, ...
A few months ago this problem cropped up in relation to "relocatable", #1749 (comment). The fix there (to not enable relocatable) was reverted. I've since tried that patch again, but still no luck; disabling relocatable makes the bild fail much earlier.
I tried latest version of rules_haskell from Git (no difference), tried upgrading Cabal (couldn't get that to build),
Expected behavior
Be delighted if we could keep using Bazel to build the Haskell code, but unsure what to try next. Any suggestions would be appreciated!
Environment
- Nix on Linux
- Bazel version: 5.2.0
- Version of the rules: both 0.15 and master