haskell-language-server-8.10.7: No match in record selector tcdLName #2403
Labels
component: ghcide
type: bug
Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
I believe the partial record selection here:
(line 449, ghcide/src/Development/IDE/Plugin/Completions/Logic.hs)
is failing when HLS tries to do name completion for a type family.
Commenting out the entire "TcClD _ x" case avoids the crash.
C.f. https://hackage.haskell.org/package/ghc-8.10.2/docs/src/GHC.Hs.Decls.html#TyClDecl
(That's 8.10.2 documentation, not sure how much it matters.)
The FamDecl and XTyClDecl data constructors don't have a field tcdLName.
The ClassDecl constructor doesn't have that field either, but the ClassDecl case is handled separately.
C.f. a03013c
Your environment
haskell-language-server version: 1.5.0.0 (GHC: 8.10.7) (PATH: /home/peter/.ghcup/bin/haskell-language-server-wrapper-1.5.0) (GIT hash: 311107eabbf0537e0c192b2c377d282505b4eff1) Tool versions found on the $PATH cabal: 3.6.2.0 stack: 2.7.3 ghc: 8.10.7
(I can also replicate the crash on a fresh build of master.)
Ubuntu
emacs
minimal example script provided
Steps to reproduce
Expected behaviour
Should see hover text and completions and other HLS stuff.
Actual behaviour
HLS crashes with:
haskell-language-server-8.10.7: No match in record selector tcdLName
Include debug information
Debug output:
Paste the logs from the lsp-client, e.g. for VS Code
LSP logs:
The text was updated successfully, but these errors were encountered: