hpc-0.6.2 doesn't build with ghc-9.6.2
hpc-0.6.2 on hackage doesn't build with ghc-9.6.2 (because constraint base < 4.18).
❯ cabal get hpc-0.6.2.0 && cd hpc-0.6.2.0 && cabal new-build hpc
Unpacking to hpc-0.6.2.0/
Resolving dependencies...
Error: cabal: Could not resolve dependencies:
[__0] trying: hpc-0.6.2.0 (user goal)
[__1] next goal: base (dependency of hpc)
[__1] rejecting: base-4.18.0.0/installed-4.18.0.0 (conflict: hpc =>
base>=4.4.1 && <4.18)
[__1] skipping: base-4.18.0.0 (has the same characteristics that caused the
previous version to fail: excluded by constraint '>=4.4.1 && <4.18' from
'hpc')
[__1] rejecting: base-4.17.1.0, base-4.17.0.0, base-4.16.4.0, base-4.16.3.0,
base-4.16.2.0, base-4.16.1.0, base-4.16.0.0, base-4.15.1.0, base-4.15.0.0,
base-4.14.3.0, base-4.14.2.0, base-4.14.1.0, base-4.14.0.0, base-4.13.0.0,
base-4.12.0.0, base-4.11.1.0, base-4.11.0.0, base-4.10.1.0, base-4.10.0.0,
base-4.9.1.0, base-4.9.0.0, base-4.8.2.0, base-4.8.1.0, base-4.8.0.0,
base-4.7.0.2, base-4.7.0.1, base-4.7.0.0, base-4.6.0.1, base-4.6.0.0,
base-4.5.1.0, base-4.5.0.0, base-4.4.1.0, base-4.4.0.0, base-4.3.1.0,
base-4.3.0.0, base-4.2.0.2, base-4.2.0.1, base-4.2.0.0, base-4.1.0.0,
base-4.0.0.0, base-3.0.3.2, base-3.0.3.1 (constraint from non-upgradeable
package requires installed instance)
[__1] fail (backjumping, conflict set: base, hpc)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, hpc
if allow-newer is given then
cabal get hpc-0.6.2.0 && cd hpc-0.6.2.0 && cabal new-build hpc --allow-newer
Unpacking to hpc-0.6.2.0/
Resolving dependencies...
Build profile: -w ghc-9.6.2 -O1
In order, the following will be built (use -v for more details):
- hpc-0.6.2.0 (lib) (first run)
Configuring library for hpc-0.6.2.0..
Preprocessing library for hpc-0.6.2.0..
Building library for hpc-0.6.2.0..
[1 of 4] Compiling Trace.Hpc.Util ( Trace/Hpc/Util.hs, /Users/shayne/tmp/hhh/hpc-0.6.2.0/hpc-0.6.2.0/hpc-0.6.2.0/hpc-0.6.2.0/dist-newstyle/build/x86_64-osx/ghc-9.6.2/hpc-0.6.2.0/build/Trace/Hpc/Util.o, /Users/shayne/tmp/hhh/hpc-0.6.2.0/hpc-0.6.2.0/hpc-0.6.2.0/hpc-0.6.2.0/dist-newstyle/build/x86_64-osx/ghc-9.6.2/hpc-0.6.2.0/build/Trace/Hpc/Util.dyn_o )
Trace/Hpc/Util.hs:35:1: error: [GHC-44360]
System.Directory: Can't be safely imported!
The module itself isn't safe.
|
35 | import System.Directory (createDirectoryIfMissing)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: cabal: Failed to build hpc-0.6.2.0.
it can be built like this
cabal get hpc-0.6.2.0 && cd hpc-0.6.2.0 && cabal new-build hpc --allow-newer --ghc-options=-fno-safe-haskell
but when it's a build dependency (of say, ghc-lib), it's not obvious how to pass -fno-safe-haskell
without resorting to a cabal.project file (is there any other way?)