Description
Your environment
Which OS do you use?
ArchLinux
Which version of GHC do you use and how did you install it?
9.8.2, managed via GHCup
How is your project built (alternative: link to the project)?
Just created a project via cabal init --simple
, answering 2) Executable
to the first and only question.
Which LSP client (editor/plugin) do you use?
Terminal Vim + YCM
Which version of HLS do you use and how did you install it?
Should be 2.9.0.1, if I understand correctly (see debug info).
Have you configured HLS in any way (especially: a hie.yaml
file)?
Not that I'm aware of (and log says definitely I don't have a hie.yaml
file), but please ask specific question if anything makes you think I have.
Steps to reproduce
- Initialize a project with
cabal init --simple
, - add the line
f = when
, - ask for
FixIt
onwhen
, - choose 4, i.e.
import Control.Monad (when)
(any other will do I guess)
Expected behaviour
import Control.Monad (when)
should be added in the preamble of the file.
Actual behaviour
Expected behavior does not happen, and this error is triggered instead:
ResponseFailedException: Request failed: -32601: No plugins are available to handle this SMethod_CodeActionResolve request.
Plugins installed for this method, but not available to handle this request are:
explicit-fields does not handle resolve requests for (unable to determine resolve owner)).
hlint does not handle resolve requests for (unable to determine resolve owner)).
overloaded-record-dot does not handle resolve requests for (unable to determine resolve owner)).
importLens does not handle resolve requests for (unable to determine resolve owner)).
Debug information
This is the log of the HLS:
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 x86_64 ghc-9.10.1
Current directory: /home/enrico/deleteme
Operating system: linux
Arguments: ["--lsp"]
Cradle directory: /home/enrico/deleteme
Cradle type: Cabal
Tool versions found on the $PATH
cabal: 3.12.1.0
stack: Not found
ghc: 9.8.2
Consulting the cradle to get project GHC version...
2024-12-17T16:50:16.704393Z | Debug | cabal exec -v0 -- ghc --print-libdir
2024-12-17T16:50:16.877467Z | Debug | cabal exec -v0 -- ghc -package-env=- -ignore-dot-ghci -e Control.Monad.join (Control.Monad.fmap System.IO.putStr System.Environment.getExecutablePath)
2024-12-17T16:50:16.951529Z | Debug | cabal --builddir=/home/enrico/.cache/hie-bios/dist-deleteme-2ffc2a9ada40f7066b50bcbb85df6a6d v2-exec --with-compiler /home/enrico/.cache/hie-bios/wrapper-b54f81dea4c0e6d1626911c526bc4e36 --with-hc-pkg /home/enrico/.cache/hie-bios/ghc-pkg-4dd077f01ab89a1f905d2fbf68335958 ghc -v0 -- --numeric-version
Environment Variables
HIE_BIOS_GHC: /home/enrico/.ghcup/ghc/9.8.2/lib/ghc-9.8.2/bin/ghc-9.8.2
HIE_BIOS_GHC_ARGS: -B/home/enrico/.ghcup/ghc/9.8.2/lib/ghc-9.8.2/lib
Project GHC version: 9.8.2
haskell-language-server exe candidates: ["haskell-language-server-9.8.2","haskell-language-server"]
Launching haskell-language-server exe at:/home/enrico/.ghcup/bin/haskell-language-server-9.8.2
2024-12-17T16:50:17.014191Z | Debug | cabal exec -v0 -- ghc --print-libdir
2024-12-17T16:50:17.154485Z | Debug | cabal exec -v0 -- ghc -package-env=- -ignore-dot-ghci -e Control.Monad.join (Control.Monad.fmap System.IO.putStr System.Environment.getExecutablePath)
2024-12-17T16:50:17.326941Z | Debug | cabal --builddir=/home/enrico/.cache/hie-bios/dist-deleteme-2ffc2a9ada40f7066b50bcbb85df6a6d v2-exec --with-compiler /home/enrico/.cache/hie-bios/wrapper-b54f81dea4c0e6d1626911c526bc4e36 --with-hc-pkg /home/enrico/.cache/hie-bios/ghc-pkg-4dd077f01ab89a1f905d2fbf68335958 ghc -v0 -- -v0 -package-env=- -ignore-dot-ghci -e Control.Monad.join (Control.Monad.fmap System.IO.putStr System.Environment.getExecutablePath)
Environment Variables
HIE_BIOS_GHC: /home/enrico/.ghcup/ghc/9.8.2/lib/ghc-9.8.2/bin/ghc-9.8.2
HIE_BIOS_GHC_ARGS: -B/home/enrico/.ghcup/ghc/9.8.2/lib/ghc-9.8.2/lib
2024-12-17T16:50:17.393004Z | Debug | cabal exec -v0 -- ghc --print-libdir
2024-12-17T16:50:17.541355Z | Debug | cabal exec -v0 -- ghc -package-env=- -ignore-dot-ghci -e Control.Monad.join (Control.Monad.fmap System.IO.putStr System.Environment.getExecutablePath)
2024-12-17T16:50:17.615097Z | Debug | cabal --builddir=/home/enrico/.cache/hie-bios/dist-deleteme-2ffc2a9ada40f7066b50bcbb85df6a6d v2-exec --with-compiler /home/enrico/.cache/hie-bios/wrapper-b54f81dea4c0e6d1626911c526bc4e36 --with-hc-pkg /home/enrico/.cache/hie-bios/ghc-pkg-4dd077f01ab89a1f905d2fbf68335958 ghc -v0 -- --print-libdir
Environment Variables
HIE_BIOS_GHC: /home/enrico/.ghcup/ghc/9.8.2/lib/ghc-9.8.2/bin/ghc-9.8.2
HIE_BIOS_GHC_ARGS: -B/home/enrico/.ghcup/ghc/9.8.2/lib/ghc-9.8.2/lib
2024-12-17T16:50:19.074650Z | Info | haskell-language-server version: 2.9.0.1 (GHC: 9.8.2) (PATH: /home/enrico/.ghcup/hls/2.9.0.1/lib/haskell-language-server-2.9.0.1/bin/haskell-language-server-9.8.2)
2024-12-17T16:50:19.075576Z | Info | Directory: /home/enrico/deleteme
2024-12-17T16:50:19.075750Z | Info | Starting (haskell-language-server) LSP server...
GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsLogLevel = Info, argsLogFile = Nothing, argsLogStderr = True, argsLogClient = False, argsThreads = 0, argsProjectGhcVersion = False}
PluginIds: [ pragmas-suggest
, pragmas-completion
, ghcide-code-actions-bindings
, ghcide-extend-import-action
, retrie
, stylish-haskell
, explicit-fields
, ghcide-code-actions-type-signatures
, ghcide-code-actions-fill-holes
, stan
, hlint
, changeTypeSignature
, ghcide-code-actions-imports-exports
, cabal-fmt
, notes
, ghcide-completions
, eval
, ghcide-type-lenses
, cabal
, overloaded-record-dot
, gadt
, LSPRecorderCallback
, importLens
, floskell
, codeRange
, class
, ormolu
, qualifyImportedNames
, ghcide-hover-and-symbols
, alternateNumberFormat
, rename
, splice
, moduleName
, semanticTokens
, fourmolu
, cabal-gild
, callHierarchy
, ghcide-core
, explicit-fixity
, pragmas-disable ]
2024-12-17T16:50:19.078922Z | Info | Logging heap statistics every 60.00s
2024-12-17T16:50:19.114935Z | Info | Starting LSP server...
If you are seeing this in a terminal, you probably should have run WITHOUT the --lsp option!
PluginIds: [ pragmas-suggest
, pragmas-completion
, ghcide-code-actions-bindings
, ghcide-extend-import-action
, retrie
, stylish-haskell
, explicit-fields
, ghcide-code-actions-type-signatures
, ghcide-code-actions-fill-holes
, stan
, hlint
, changeTypeSignature
, ghcide-code-actions-imports-exports
, cabal-fmt
, notes
, ghcide-completions
, eval
, ghcide-type-lenses
, cabal
, overloaded-record-dot
, gadt
, LSPRecorderCallback
, importLens
, floskell
, codeRange
, class
, ormolu
, qualifyImportedNames
, ghcide-hover-and-symbols
, alternateNumberFormat
, rename
, splice
, moduleName
, semanticTokens
, fourmolu
, cabal-gild
, callHierarchy
, ghcide-core
, explicit-fixity
, pragmas-disable ]
2024-12-17T16:50:19.115439Z | Info | Starting server
2024-12-17T16:50:19.117428Z | Info | Registering IDE configuration: IdeConfiguration {workspaceFolders = fromList [NormalizedUri 3429100310501239661 "file:///home/enrico/deleteme"], clientSettings = hashed (Just (Object (fromList [])))}
2024-12-17T16:50:19.124235Z | Info | Started LSP server in 0.01s
2024-12-17T16:50:19.465468Z | Warning | LSP: can't register dynamically for: "workspace/didChangeConfiguration"
2024-12-17T16:50:19.471055Z | Info | Cradle path: app/Main.hs
2024-12-17T16:50:19.471207Z | 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.
2024-12-17T16:50:19.473468Z | Info | invoking build tool to determine build flags (this may take some time depending on the cache)
2024-12-17T16:50:19.843868Z | Info | Load cabal cradle using single file
2024-12-17T16:50:20.160300Z | Info | cabal --builddir=/home/enrico/.cache/hie-bios/dist-deleteme-2ffc2a9ada40f7066b50bcbb85df6a6d v2-repl --with-compiler /home/enrico/.cache/hie-bios/wrapper-b54f81dea4c0e6d1626911c526bc4e36 --with-hc-pkg /home/enrico/.cache/hie-bios/ghc-pkg-4dd077f01ab89a1f905d2fbf68335958 /home/enrico/deleteme/app/Main.hs
Environment Variables
HIE_BIOS_OUTPUT: /tmp/HIE_BIOS_OUTPUT457387-0
HIE_BIOS_GHC: /home/enrico/.ghcup/ghc/9.8.2/lib/ghc-9.8.2/bin/ghc-9.8.2
HIE_BIOS_GHC_ARGS: -B/home/enrico/.ghcup/ghc/9.8.2/lib/ghc-9.8.2/lib
2024-12-17T16:50:22.061086Z | Info | Interface files cache directory: /home/enrico/.cache/ghcide/deleteme-0.1.0.0-inplace-deleteme-c38452dbce672bbfc236ac73975e156b42d15720
2024-12-17T16:50:22.070915Z | Info | Making new HscEnv. In-place unit ids: [deleteme-0.1.0.0-inplace-deleteme]
2024-12-17T16:50:27.362922Z | Warning | No plugin handles this "codeAction/resolve" request.