Skip to content

Client stuck on "Processing: n/n" on projects using GHC 9.8.4 #4503

Closed
@OlaoluwaM

Description

@OlaoluwaM

Your environment

Which OS do you use: MacOS Sequoia 15.3 (M2 Pro)

Steps to reproduce

  1. Install GHC 9.8.4 using GHCup
  2. Compile HLS using the command ghcup compile hls --ghc 9.8.4 --git-ref master --git-describe-version
  3. Create a new stack project stack new sample-project new-template
  4. Open this new project in vscode with vscode-haskell extension enabled and running

Expected behaviour

vscode-haskell should load successfully.

Actual behaviour

vscode-haskell loads but hangs on "Processing: n/n" even on a new project. I suspect this might be because of an IntMap exception being thrown

Image

Include debug information

Execute in the root of your project the command haskell-language-server-wrapper --debug . and paste the logs here (you can find the executable location here):

Debug output:
No 'hie.yaml' found. Try to discover the project type!
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 2.9.0.1 aarch64 ghc-9.8.4
Current directory: /Volumes/Code/example
Operating system: darwin
Arguments: ["--debug","."]
Cradle directory: /Volumes/Code/example
Cradle type: Stack

Tool versions found on the $PATH
cabal:          3.12.1.0
stack:          3.3.1
ghc:            9.8.4


Consulting the cradle to get project GHC version...
2025-02-21T11:29:45.968316Z | Debug | stack --stack-yaml /Volumes/Code/example/stack.yaml setup --silent
2025-02-21T11:29:46.272803Z | Debug | stack --stack-yaml /Volumes/Code/example/stack.yaml exec ghc -- --numeric-version
Project GHC version: 9.8.4
haskell-language-server exe candidates: ["haskell-language-server-9.8.4","haskell-language-server"]
Launching haskell-language-server exe at:/Users/ola.mustapha/.ghcup/bin/haskell-language-server-9.8.4
2025-02-21T11:29:47.143613Z | Debug | stack --stack-yaml /Volumes/Code/example/stack.yaml setup --silent
2025-02-21T11:29:47.755964Z | Debug | stack --stack-yaml /Volumes/Code/example/stack.yaml exec ghc -- -v0 -package-env=- -ignore-dot-ghci -e Control.Monad.join (Control.Monad.fmap System.IO.putStr System.Environment.getExecutablePath)
2025-02-21T11:29:48.620483Z | Debug | stack --stack-yaml /Volumes/Code/example/stack.yaml setup --silent
2025-02-21T11:29:48.903224Z | Debug | stack --stack-yaml /Volumes/Code/example/stack.yaml exec ghc -- --print-libdir
2025-02-21T11:29:49.098850Z | Info | haskell-language-server version: 2.9.0.1 (GHC: 9.8.4) (PATH: /Users/ola.mustapha/.ghcup/bin/haskell-language-server-9.8.4~2.2.0.0-442-g9891292e)
2025-02-21T11:29:49.099953Z | Info | Directory: /Volumes/Code/example
2025-02-21T11:29:49.100262Z | Info | Logging heap statistics every 60.00s
 ghcide setup tester in /Volumes/Code/example.
Report bugs at https://github.com/haskell/haskell-language-server/issues

Step 1/4: Finding files to test in /Volumes/Code/example
Found 4 files

Step 2/4: Looking for hie.yaml files that control setup
Found 1 cradle
  ()

Step 3/4: Initializing the IDE
2025-02-21T11:29:49.120362Z | Debug | Initializing exports map from hiedb
2025-02-21T11:29:49.121174Z | Debug | Shake session initialized

Step 2025-02-21T11:29:49.121242Z | Debug | Done initializing exports map from hiedb. Size: 0
4/4: Type checking the files
2025-02-21T11:29:49.123613Z | Info | Cradle path: test/Spec.hs
2025-02-21T11:29:49.123660Z | Warning | No [cradle](https://github.com/mpickering/hie-bios#hie-bios) found for test/Spec.hs.
Proceeding with [implicit cradle](https://hackage.haskell.org/package/implicit-hie).
You should ignore this message, unless you see a 'Multi Cradle: No prefixes matched' error.
2025-02-21T11:29:49.128062Z | Debug | Cradle: Cradle{ cradleRootDir = "/Volumes/Code/example", cradleOptsProg = CradleAction: Stack}
2025-02-21T11:29:49.128128Z | Info | invoking build tool to determine build flags (this may take some time depending on the cache)
2025-02-21T11:29:49.128167Z | Debug | Requested to load Stack cradle using single file mode
2025-02-21T11:29:49.129576Z | Info | stack --stack-yaml /Volumes/Code/example/stack.yaml repl --no-nix-pure --with-ghc /Users/ola.mustapha/.cache/hie-bios/wrapper-b54f81dea4c0e6d1626911c526bc4e36 example:test:example-test
  Environment Variables
    HIE_BIOS_OUTPUT: /private/var/folders/s9/jnm0bqp12xdcqz9wlmbtlbwr0000gn/T/HIE_BIOS_OUTPUT93538-0
2025-02-21T11:29:49.532886Z | Debug | Using main module:
2025-02-21T11:29:49.533095Z | Debug | 1.  Package example, component example:test:example-test, with main-is file:
2025-02-21T11:29:49.533195Z | Debug |     /Volumes/Code/example/test/Spec.hs.
2025-02-21T11:29:49.533228Z | Debug | 
2025-02-21T11:29:49.692368Z | Debug | All test running disabled by --no-run-tests flag. To mute this message in future, set
2025-02-21T11:29:49.692565Z | Debug | notify-if-no-run-tests: false in Stack's configuration.
2025-02-21T11:29:49.694860Z | Debug | example> initial-build-steps (lib + test)
2025-02-21T11:29:49.937570Z | Debug | 
2025-02-21T11:29:49.937702Z | Debug | Warning: The following GHC options are incompatible with GHCi and have not been passed to it:
2025-02-21T11:29:49.937767Z | Debug |          -threaded and -O0.
2025-02-21T11:29:49.937797Z | Debug |          
2025-02-21T11:29:49.937830Z | Debug | Configuring GHCi with the following packages: example.
2025-02-21T11:29:50.011849Z | Info | stack --stack-yaml /Volumes/Code/example/stack.yaml path --ghc-package-path
  Environment Variables
    HIE_BIOS_OUTPUT: /private/var/folders/s9/jnm0bqp12xdcqz9wlmbtlbwr0000gn/T/HIE_BIOS_OUTPUT93538-1
2025-02-21T11:29:50.227332Z | Debug | /Volumes/Code/example/.stack-work/install/aarch64-osx/ee26a578b9657a9fb177b80ae023830fc4b75b5e11964a945cc063b6767e47b1/9.8.4/pkgdb:/Users/ola.mustapha/.stack/snapshots/aarch64-osx/ee26a578b9657a9fb177b80ae023830fc4b75b5e11964a945cc063b6767e47b1/9.8.4/pkgdb:/Users/ola.mustapha/.stack/programs/aarch64-osx/ghc-9.8.4/lib/ghc-9.8.4/lib/package.conf.d
2025-02-21T11:29:51.100683Z | Debug | stack --stack-yaml /Volumes/Code/example/stack.yaml setup --silent
2025-02-21T11:29:51.396526Z | Debug | stack --stack-yaml /Volumes/Code/example/stack.yaml exec ghc -- --print-libdir
2025-02-21T11:29:52.255080Z | Debug | stack --stack-yaml /Volumes/Code/example/stack.yaml setup --silent
2025-02-21T11:29:52.546076Z | Debug | stack --stack-yaml /Volumes/Code/example/stack.yaml exec ghc -- --numeric-version
2025-02-21T11:29:52.546264Z | Debug | Session loading result: Right (ComponentOptions {componentOptions = ["-i","-odir=/Volumes/Code/example/.stack-work/odir","-hidir=/Volumes/Code/example/.stack-work/odir","-hide-all-packages","-XHaskell2010","-i/Volumes/Code/example/.stack-work/dist/aarch64-osx/ghc-9.8.4/build/example-test","-i/Volumes/Code/example/test","-i/Volumes/Code/example/.stack-work/dist/aarch64-osx/ghc-9.8.4/build/example-test/autogen","-i/Volumes/Code/example/.stack-work/dist/aarch64-osx/ghc-9.8.4/build/global-autogen","-i/Volumes/Code/example/.stack-work/dist/aarch64-osx/ghc-9.8.4/build/example-test/example-test-tmp","-stubdir=/Volumes/Code/example/.stack-work/dist/aarch64-osx/ghc-9.8.4/build","-I/opt/homebrew/Cellar/librdkafka/2.8.0/include","-L/opt/homebrew/Cellar/librdkafka/2.8.0/lib","-package-id=base-4.19.2.0-1e06","-package=example-0.1.0.0","-Wall","-Wcompat","-Widentities","-Wincomplete-record-updates","-Wincomplete-uni-patterns","-Wmissing-export-lists","-Wmissing-home-modules","-Wpartial-fields","-Wredundant-constraints","-rtsopts","-with-rtsopts=-N","-fconstraint-solver-iterations=10","-fobject-code","-j","-optP-include","-optP/Volumes/Code/example/.stack-work/ghci/8a69701f/cabal_macros.h","-ghci-script=/Users/ola.mustapha/.cache/stack/ghci-script/40f88e79/ghci-script","-package-db","/Volumes/Code/example/.stack-work/install/aarch64-osx/ee26a578b9657a9fb177b80ae023830fc4b75b5e11964a945cc063b6767e47b1/9.8.4/pkgdb","-package-db","/Users/ola.mustapha/.stack/snapshots/aarch64-osx/ee26a578b9657a9fb177b80ae023830fc4b75b5e11964a945cc063b6767e47b1/9.8.4/pkgdb","-package-db","/Users/ola.mustapha/.stack/programs/aarch64-osx/ghc-9.8.4/lib/ghc-9.8.4/lib/package.conf.d"], componentRoot = "/Volumes/Code/example", componentDependencies = ["example.cabal","package.yaml","/Volumes/Code/example/stack.yaml"]},"/Users/ola.mustapha/.stack/programs/aarch64-osx/ghc-9.8.4/lib/ghc-9.8.4/lib","9.8.4")
2025-02-21T11:29:52.552572Z | Info | Interface files cache directory: /Users/ola.mustapha/.cache/ghcide/main-9120dc0769a2d54168dff488d5312f4e20a58ac6-9120dc0769a2d54168dff488d5312f4e20a58ac6
2025-02-21T11:29:52.555080Z | Info | Making new HscEnv. In-place unit ids: [ main-9120dc0769a2d54168dff488d5312f4e20a58ac6 ]
2025-02-21T11:29:52.559184Z | Info | Cradle path: Setup.hs
2025-02-21T11:29:52.559285Z | Warning | No [cradle](https://github.com/mpickering/hie-bios#hie-bios) found for Setup.hs.
Proceeding with [implicit cradle](https://hackage.haskell.org/package/implicit-hie).
You should ignore this message, unless you see a 'Multi Cradle: No prefixes matched' error.
2025-02-21T11:29:52.563895Z | Debug | Cradle: Cradle{ cradleRootDir = "/Volumes/Code/example", cradleOptsProg = CradleAction: Stack}
2025-02-21T11:29:52.564085Z | Info | invoking build tool to determine build flags (this may take some time depending on the cache)
2025-02-21T11:29:52.564175Z | Debug | Session loading result: Left [CradleError {cradleErrorDependencies = [], cradleErrorExitCode = ExitSuccess, cradleErrorStderr = ["Multi Cradle: No prefixes matched","pwd: /Volumes/Code/example","filepath: /Volumes/Code/example/Setup.hs","prefixes:","(\"/Volumes/Code/example/test\",Stack)","(\"/Volumes/Code/example/src\",Stack)","(\"/Volumes/Code/example/app/Main.hs\",Stack)"]}]
2025-02-21T11:29:52.565132Z | Info | Cradle path: app/Main.hs
2025-02-21T11:29:52.565184Z | Warning | No [cradle](https://github.com/mpickering/hie-bios#hie-bios) found for app/Main.hs.
Proceeding with [implicit cradle](https://hackage.haskell.org/package/implicit-hie).
You should ignore this message, unless you see a 'Multi Cradle: No prefixes matched' error.
2025-02-21T11:29:52.569356Z | Debug | Cradle: Cradle{ cradleRootDir = "/Volumes/Code/example", cradleOptsProg = CradleAction: Stack}
2025-02-21T11:29:52.569475Z | Info | invoking build tool to determine build flags (this may take some time depending on the cache)
2025-02-21T11:29:52.569524Z | Debug | Requested to load Stack cradle using single file mode
2025-02-21T11:29:52.571096Z | Info | stack --stack-yaml /Volumes/Code/example/stack.yaml repl --no-nix-pure --with-ghc /Users/ola.mustapha/.cache/hie-bios/wrapper-b54f81dea4c0e6d1626911c526bc4e36 example:exe:example-exe
  Environment Variables
    HIE_BIOS_OUTPUT: /private/var/folders/s9/jnm0bqp12xdcqz9wlmbtlbwr0000gn/T/HIE_BIOS_OUTPUT93538-2
2025-02-21T11:29:52.575391Z | Debug | Finished: User TypeCheck Took: 3.45s
haskell-language-server-9.8.4: IntMap.!: key 24 is not an element of the map
CallStack (from HasCallStack):
  error, called at libraries/containers/containers/src/Data/IntMap/Internal.hs:601:17 in containers-0.6.8-1965:Data.IntMap.Internal

Paste the contents of extension specific log, you can check instructions about how to find it here

Extension log:
[vscode-haskell.log](https://github.com/user-attachments/files/18905808/vscode-haskell.log)

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: hls-graphtype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions