-
-
Notifications
You must be signed in to change notification settings - Fork 401
Description
Your environment
Which OS do you use?
I'm on up-to-date ArchLinux
Which version of GHC do you use and how did you install it?
I manage my Haskell environment via GHCup, which I use to keep GHC, cabal, and HLS relatively up-to-date.
How is your project built (alternative: link to the project)?
The Haskell source code of the project seems to be unimportant. This is enough, for instance
import Data.Char
import Unsafe.Coerce
main :: IO ()
main = undefined
and I suspect you can even remove all but the last line.
The .cabal
file is probably more important (despite I presume that the relevant bits from it could be cabal-version
and default-language
at most):
cabal-version: 3.0
cabal-version: 3.0
name: app
version: 0.1.0.0
executable app
main-is: Main.hs
build-depends: base
hs-source-dirs: .
default-language: GHC2024
Which LSP client (editor/plugin) do you use?
Terminal Vim
Which version of HLS do you use and how did you install it?
2.10.0.0 and 2.11.0.0, managed via GHCup.
Have you configured HLS in any way (especially: a hie.yaml
file)?
Not that I know of (am I supposed to have such a file in the project, had I done such a configuration?).
Steps to reproduce
Essentially, try the 4 combinations of cabal [3.14.2.0, 3.16.0.0] × HLS [2.10.0.0, 2.11.0.0]. And see if the editor reacts as you expect when you mess up with the code.
Expected behaviour
I'd expect the language server features to work.
Actual behaviour
The project I used compiled with both versions of cabal, but only pairing cabal 3.14.2.0 with HLS 2.10.0.0 results in the language server providing the expected diagnostics in the editor.
Of the other 3 combinations,
- cabal 3.16.0.0 × HSL 2.10.0.0 results in HLS claiming this error happens (even if when I compile the package all is fine):
Failed to parse result of calling cabal Failed command: cabal --builddir=/home/enrico/.cache/hie-bios/dist-app-4394646ff9b9f9ca795af074e2219448 v2-repl --with-compiler /home/enrico/.cache/hie-bios/wrapper-b54f81dea4c0e6d1626911c526bc4e36 --with-hc-pkg /home/enrico/.cache/hie-bios/ghc-pkg-df5545328ebfb0b680269f72e3a89ac0 /home/enrico/deleteme/app/Main.hs Build profile: -w ghc-9.10.1 -O1 In order, the following will be built (use -v for more details): - app-0.1.0.0 (interactive) (exe:app) (cannot read state cache) Configuring executable 'app' for app-0.1.0.0... Preprocessing executable 'app' for app-0.1.0.0... GHCi, version 9.10.1: https://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/enrico/myconfigfiles/HOME/#ghci [1 of 2] Compiling Main ( Main.hs, interpreted ) Ok, one module loaded. λ> Leaving GHCi. Process Environment: HIE_BIOS_GHC: /home/enrico/.ghcup/ghc/9.10.1/lib/ghc-9.10.1/bin/ghc-9.10.1 HIE_BIOS_GHC_ARGS: -B/home/enrico/.ghcup/ghc/9.10.1/lib/ghc-9.10.1/lib
- cabal [3.14.2.0, 3.16.0.0] × HLS 2.11.0.0 both result in HLS not telling showing anything.
Debug information
Please, tell me what I can provide.