Skip to content

BadDependency "GetLinkable" #4721

@dschrempf

Description

@dschrempf

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)?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: hls-eval-plugintype: 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