haskell / haskell/haskell-language-server
BadDependency "GetLinkable"
- Dominant language
- Haskell
- Stars
- 3k
- Forks
- 455
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 13
Description
This is a weird error/bug that is maybe related to my local setup.
Usually, the `eval` plugin works just fine, but there is a specific project where it does not, and instead reports `BadDependency "GeLinkable"`. The specific error I get in the editor console is
```
LSP :: Error condition, please check your setup and/or the [issue tracker](https://github.com/haskell/haskell-language-server/issues):
eval: Internal Error: BadDependency "GetLinkable"
lsp-workspace-command-execute: ‘workspace/executeCommand’ with ‘16405:eval:evalCommand’ failed.
(error "eval: Internal Error: BadDependency \"GetLinkable\"")
```
The HLS debug output is not informative at all (see below).
```
2025-09-04T04:40:51.338332Z | Debug | Restarting build session due to Eval
Action Queue: []
Keys: [ IsEvaluating; /home/dominik/work/hs-bindgen/hs-bindgen/src-internal/HsBindgen/Frontend/AST/PrettyPrinter.hs ]
Aborting previous build session took 0.00s
toIfaceIdDetails [ClassOp]
toIfaceIdDetails [ClassOp]
toIfaceIdDetails [DataConWrapper]
toIfaceIdDetails [DataConWrapper]
toIfaceIdDetails [ClassOp]
toIfaceIdDetails [ClassOp]
toIfaceIdDetails [DataConWrapper]
toIfaceIdDetails [DataConWrapper]
toIfaceIdDetails [ClassOp]
toIfaceIdDetails [ClassOp]
toIfaceIdDetails [ClassOp]
... (MANY MORE)
... THEN AGAIN:
2025-09-04T04:40:53.881170Z | Debug | Finished build session
AsyncCancelled
2025-09-04T04:40:53.881322Z | Debug | Restarting build session due to Eval
Action Queue: []
Keys: [ IsEvaluating; /home/dominik/work/hs-bindgen/hs-bindgen/src-internal/HsBindgen/Frontend/AST/PrettyPrinter.hs ]
Aborting previous build session took 0.00s
2025-09-04T04:40:53.881665Z | Error | eval: Internal Error: BadDependency "GetLinkable"
```
Is there anything I can do to debug this issue a bit more methodologically? I do not really know where to start :-).
### Your environment
#### Which OS do you use?
- NixOS
#### Which version of GHC do you use and how did you install it?
- The Glorious Glasgow Haskell Compilation System, version 9.12.2
- Installed via Nix Flake
#### How is your project built (alternative: link to the project)?
- cabal-install version 3.14.2.0
- compiled using version 3.14.2.0 of the Cabal library
- https://github.com/well-typed/hs-bindgen
#### Which LSP client (editor/plugin) do you use?
Emacs with `lsp-mode` with `lsp-haskell`
#### Have you configured HLS in any way (especially: a `hie.yaml` file)?
No
### Steps to reproduce
Open a file in the project, try to evaluate a declaration
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure in hs-bindgen using GHC 9.12.2, Cabal 3.14.2.0, Emacs with lsp-mode, and the eval action on HsBindgen/Frontend/AST/PrettyPrinter.hs. Start with the HLS debug output and the eval plugin path; done means the BadDependency "GetLinkable" failure is explained and a diagnostic or fix is identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- emacs, haskell
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100