Closed soulomoon closed 6 months ago
It seems cabal v2-repl --keep-temp-files --enable-multi-repl /Volumes/src/tmp/haskell-language-server/ghcide/exe/Arguments.hs
fails on hls code base
and it is fine if we use
cabal v2-repl /Volumes/src/tmp/haskell-language-server/ghcide/exe/Arguments.hs
Probably this issue should be transferred to cabal?
A version mismatch, it is expected?🤔 The same cabal build the project just fine.
Looks like https://github.com/haskell/cabal/issues/9632, try the same workaround in cabal.project
?..
Thanks, the workaround does the magic @Bodigrim Of reviewing what the real issue is
❯ cabal v2-repl --keep-temp-files --enable-multi-repl /Volumes/src/tmp/haskell-language-server/ghcide/exe/Arguments.hs
...
Installing ghc-paths-0.1.0.12 (all, legacy fallback: build-type is Custom)
Completed ghc-paths-0.1.0.12 (all, legacy fallback: build-type is Custom)
Error: [Cabal-7125]
Failed to build entropy-0.4.1.10 (which is required by exe:ghcide from ghcide-2.7.0.0). The failure occurred during the configure step. The exception was:
/Users/ares/.cabal/logs/ghc-9.8.2/ntrpy-0.4.1.10-1528a9b1.log: withFile: user error (Error: cabal: '/Users/ares/.ghcup/bin/ghc' exited with an error:
/Volumes/src/tmp/haskell-language-server/dist-newstyle/tmp/src-97692/entropy-0.4.1.10/dist/setup/setup.hs:111:23:
error: [GHC-83865]
• Couldn't match type: Maybe
(Distribution.Utils.Path.SymbolicPath
Distribution.Utils.Path.CWD
(Distribution.Utils.Path.Dir Distribution.Utils.Path.Pkg))
with: [Char]
Expected: Verbosity -> FilePath -> [String] -> IO ExitCode
Actual: Verbosity
-> Maybe
(Distribution.Utils.Path.SymbolicPath
Distribution.Utils.Path.CWD
(Distribution.Utils.Path.Dir Distribution.Utils.Path.Pkg))
-> FilePath
-> [String]
-> IO ExitCode
• Probable cause: ‘rawSystemExitCode’ is applied to too few arguments
In the expression: rawSystemExitCode
In an equation for ‘myRawSystemExitCode’:
myRawSystemExitCode = rawSystemExitCode
|
111 | myRawSystemExitCode = rawSystemExitCode
| ^^^^^^^^^^^^^^^^^
)
Turn out this workaround would need the pin the extact cabal version to 3.12.0+0
that shipped with the cabal-install I use https://gitlab.haskell.org/haskell/cabal/-/jobs/1848815.
allow-newer:
*:Cabal,
*:Cabal-syntax
source-repository-package
type: git
location: https://github.com/haskell/cabal.git
subdir: Cabal Cabal-syntax
tag : 3.12.0+0
@soulomoon: why is the official tag 3.12.0.0 not enough? It should be. What tag/branch have you been using that did not work with the workaround?
@soulomoon: why is the official tag 3.12.0.0 not enough? It should be. What tag/branch have you been using that did not work with the workaround?
sorry for not stating it clear, not pin to a tag is not enough, pin to tag 3.12.0.0 fix that.
Cool! Thank you very much for the confirmation.
Another error, it is fine if I repl each file, but not when it come togather ==== update You need to cd to ghcide to observe this. Works fine
cabal v2-repl --enable-multi-repl /Volumes/src/soulomoonHLS/ghcide/test/src/Development/IDE/Test.hs
cabal v2-repl --enable-multi-repl /Volumes/src/soulomoonHLS/ghcide/test/exe/DependentFileTest.hs
But not
❯ cabal v2-repl --enable-multi-repl /Volumes/src/soulomoonHLS/ghcide/test/src/Development/IDE/Test.hs /Volumes/src/soulomoonHLS/ghcide/test/exe/DependentFileTest.hs
Build profile: -w ghc-9.8.2 -O1
In order, the following will be built (use -v for more details):
- ghcide-2.7.0.0 (interactive) (lib:ghcide-test-utils) (first run)
- haskell-language-server-2.7.0.0 (interactive) (test:ghcide-tests) (configuration changed)
Preprocessing library 'ghcide-test-utils' for ghcide-2.7.0.0...
Configuring test suite 'ghcide-tests' for haskell-language-server-2.7.0.0...
Error:
Dependency on unbuildable library 'ghcide-test-utils' from ghcide
Error: [Cabal-7125]
Failed to build test:ghcide-tests from haskell-language-server-2.7.0.0. The failure occurred during the configure step.
maybe when we repl both, we pick up some package that have a setup.hs mismatching Cabal with
subdir: Cabal Cabal-syntax
tag : 3.12.0+0
It is a dependency problem, I opened new issue to push for the update for the dependency instead https://github.com/haskell/haskell-language-server/issues/4219
Using cabal 3.12 prerelease and set up multiple home component.
I am getting this error in hls