Recently Cabal 3.0.0.0 and cabal-install 3.0.0.0 was released, bringing along the following relevant changes I could find:
cabal-helper HIE is using still references these old symbols. upstream cabal-helper doesn't reference them anymore.cabal configure is not using old-style builds anymore. This is a problem because both cabal-helper and ghc-mod have the assumption that old-style builds are the default in that they use cabal configure and such, and not cabal v1-configure.ghc-mod: https://github.com/alanz/ghc-mod/blob/910887b2c33237b703417ec07f35ca8bbf35d729/core/GhcMod/CabalHelper.hs#L192-L197.cabal-helper: https://github.com/alanz/cabal-helper/blob/eafed5e8c1d82b8daa35775b52361132f2e70261/src/CabalHelper/Compiletime/Compile.hs#L452As far as I can see, this results in HIE being broken for everybody using Cabal 3.0.0.0
ghc-mod and cabal-helper to use v1- commands explicitlycabal-helper to not use the deprecated symbols anymore, by looking at what upstream cabal-helper did to remove them. This might be simple or it might not be simple at allcabal-helper to the upstream version, this is what https://github.com/haskell/haskell-ide-engine/pull/1245 tries to do, but there seems to be some problemsPing @fendor @bubba @alanz @mpickering @DanielG
Related issues:
I'm afraid it still does not work with the current master:
$ cabal v2-run ./install.hs --project-file install/shake.project hie-8.6.5
Resolving dependencies...
Build profile: -w ghc-8.6.5 -O1
In order, the following will be built (use -v for more details):
- fake-package-0 (exe:script) (configuration changed)
Configuring executable 'script' for fake-package-0..
Preprocessing executable 'script' for fake-package-0..
Building executable 'script' for fake-package-0..
[1 of 1] Compiling Main ( Main.hs, /Users/ur20980/src/haskell-ide-engine/dist-newstyle/build/x86_64-osx/ghc-8.6.5/fake-package-0/x/script/build/script/script-tmp/Main.dyn_o )
Linking /Users/ur20980/src/haskell-ide-engine/dist-newstyle/build/x86_64-osx/ghc-8.6.5/fake-package-0/x/script/build/script/script ...
. . . . .
Installing cabal-install-3.0.0.0 (all, legacy fallback)
Completed cabal-install-3.0.0.0 (all, legacy fallback)
Symlinking 'hie'
Warning: Failed to build documentation for haddock-api-2.22.0 (which is
required by exe:hie-wrapper from haskell-ide-engine-0.12.0.0 and exe:hie from
haskell-ide-engine-0.12.0.0).
Symlinking 'hie-wrapper'
Error when running Shake build system:
at want, called at src/Development/Shake/Internal/Args.hs:81:69 in shk-0.17.8-b3e20d9c:Development.Shake.Internal.Args
* Depends on: hie-8.6.5
at need, called at src/HieInstall.hs:90:37 in hie-install-0.8.0.0-inplace:HieInstall
* Depends on: cabal-hie-8.6.5
* Raised the exception:
/Users/ur20980/.local/bin/hie: copyFile:atomicCopyFileContents:withReplacementFile:copyFileToHandle:openBinaryFile: does not exist (No such file or directory)
Here's the full output: cabal-v2-fail.txt
Before you ask - stack fails to build hie too:
$ stack -v ./install.hs hie-8.6.5 2>&1 | tee ~/stack-fail.txt
-- While building package hie-install-0.8.0.0 using:
/Users/ur20980/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.5 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.4.0.1 build lib:hie-install --ghc-options ""
Process exited with code: ExitFailure 1
$
$ /Users/ur20980/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.5 --version
Cabal library version 2.4.0.1
$
Versions:
ghcup$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.6.5
$ cabal --version
cabal-install version 3.0.0.0
compiled using version 3.0.0.0 of the Cabal library
$ stack --version
Version 2.1.3, Git revision 0fa51b9925decd937e4a993ad90cb686f88fa282 (7739 commits) x86_64 hpack-0.31.2
$ uname -a
Darwin xxxxxx 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64
$
Ping @fendor @bubba @alanz @mpickering @DanielG
Current master does not support Cabal 3.0.0.0.
However, the hie-bios branch does support Cabal 3.0.0.0.
EDIT: @mouse07410, your errors seem to me completely independent of Cabal 3 support. Installation of hie should work fine with cabal 3.0.
What would you recommend me to do? Pull a different branch? And would you like me to open a separate issue?
Using branch hie-bios did not help, though the error changed:
$ stack -v ./install.hs hie-8.6.5 2>&1 | tee ~/stack-fail.txt
Linking /Users/ur20980/.stack/setup-exe-cache/x86_64-osx/tmp-Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.2 ...
<command line>: can't load .so/.DLL for: libgmp.dylib (dlopen(libgmp.dylib, 5): image not found)
$ git branch
* hie-bios
master
$ ll /opt/local/lib/libgmp.dylib
lrwxr-xr-x 1 root admin 15 Dec 11 2018 /opt/local/lib/libgmp.dylib@ -> libgmp.10.dylib
$ ll /opt/local/lib/libgmp.10.dylib
-rwxr-xr-x 1 root admin 553448 Dec 11 2018 /opt/local/lib/libgmp.10.dylib*
$
Yes, please open a different issue. It might be MacOS specific.
@mouse07410 see https://gitlab.haskell.org/ghc/ghc/issues/15769
We are supporting Cabal 3.0.0.0 from #1126 on!
Most helpful comment
We are supporting Cabal 3.0.0.0 from #1126 on!