Closed
Description
Your environment
Which OS do you use: Fedora 34
HLS version: haskell-language-server version: 1.6.1.1 (GHC: 8.10.7)
Which LSP client (editor/plugin) do you use: Neovim's LSP client
Describe your project: https://github.com/tchoutri/pg-entity
Steps to reproduce
run haskell-language-server-wrapper --debug
in the project with the following hie.yaml
cradle:
multi:
- path: "./example"
config:
cradle:
none:
- path: "./"
config:
cradle:
cabal:
- path: "./src"
component: "lib:pg-entity"
- path: "./test"
component: "pg-entity:test:entity-test"
Expected behaviour
HLS ignores the files located in ./example
Actual behaviour
HLS tries to process the files in ./example
and fails. Meanwhile, hie-bios
has no trouble determining that these files have no cradle:
❯ hie-bios debug example/app/Main.hs
No cradle
Include debug information
2022-02-05 18:28:54.720122789 [ThreadId 383] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/tchoutri/Projects/pg-entity/src/Database/PostgreSQL/Entity/Internal/Unsafe.hs"
2022-02-05 18:28:54.72018192 [ThreadId 385] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/tchoutri/Projects/pg-entity/test/Main.hs"
2022-02-05 18:28:54.720231304 [ThreadId 387] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/tchoutri/Projects/pg-entity/src/Database/PostgreSQL/Entity/DBT.hs"
2022-02-05 18:28:54.720280258 [ThreadId 389] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/tchoutri/Projects/pg-entity/src/Database/PostgreSQL/Entity.hs"
2022-02-05 18:28:54.72033031 [ThreadId 391] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/tchoutri/Projects/pg-entity/src/Database/PostgreSQL/Entity/Internal/QQ.hs"
2022-02-05 18:28:54.720452395 [ThreadId 382] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/tchoutri/Projects/pg-entity/example/src/Processing/Entity.hs"
2022-02-05 18:28:54.72050127 [ThreadId 384] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/tchoutri/Projects/pg-entity/test/GenericsSpec.hs"
2022-02-05 18:28:54.720547124 [ThreadId 386] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/tchoutri/Projects/pg-entity/example/app/Main.hs"
2022-02-05 18:28:54.720662027 [ThreadId 388] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/tchoutri/Projects/pg-entity/src/Database/PostgreSQL/Entity/Internal/BlogPost.hs"
2022-02-05 18:28:54.720741116 [ThreadId 414] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/tchoutri/Projects/pg-entity/src/Database/PostgreSQL/Entity/Types.hs"
2022-02-05 18:28:54.720790094 [ThreadId 390] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/tchoutri/Projects/pg-entity/src/Database/PostgreSQL/Entity/Internal.hs"
2022-02-05 18:28:54.721004093 [ThreadId 409] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/tchoutri/Projects/pg-entity/test/EntitySpec.hs"
2022-02-05 18:28:54.721616033 [ThreadId 456] INFO hls: Consulting the cradle for "example/app/Main.hs"
2022-02-05 18:28:54.721891196 [ThreadId 456] DEBUG hls: Output from setting up the cradle Cradle {cradleRootDir = "/home/tchoutri/Projects/pg-entity", cradleOptsProg = CradleAction: Cabal}
2022-02-05 18:28:54.721965569 [ThreadId 456] DEBUG hls: Session loading result: Left []
2022-02-05 18:28:54.725585652 [ThreadId 547] INFO hls: Consulting the cradle for "example/src/Processing/Entity.hs"
2022-02-05 18:28:54.725747485 [ThreadId 547] DEBUG hls: Output from setting up the cradle Cradle {cradleRootDir = "/home/tchoutri/Projects/pg-entity", cradleOptsProg = CradleAction: Cabal}
2022-02-05 18:28:54.72583645 [ThreadId 547] DEBUG hls: Session loading result: Left []
2022-02-05 18:28:56.214598877 [ThreadId 340] INFO hls: finish: User TypeCheck (took 1.49s)
2022-02-05 18:28:56.307457234 [ThreadId 1081] INFO hls: finish: GetHie (took 0.09s)
2022-02-05 18:28:56.30810004 [ThreadId 1144] INFO hls: finish: GenerateCore (took 0.00s)
2022-02-05 18:28:56.311785919 [ThreadId 1146] DEBUG hls: LOOKUP UP PERSISTENT FOR: GetModSummaryWithoutTimestamps
2022-02-05 18:28:56.311905204 [ThreadId 1146] DEBUG hls: LOOKUP UP PERSISTENT FOR: False
Files that failed:
* /home/tchoutri/Projects/pg-entity/example/app/Main.hs
* /home/tchoutri/Projects/pg-entity/example/src/Processing/Entity.hs
Completed (10 files worked, 2 files failed)
2022-02-05 18:28:56.357170892 [ThreadId 1150] DEBUG hls: LOOKUP UP PERSISTENT FOR: GetModSummaryWithoutTimestamps
2022-02-05 18:28:56.357272158 [ThreadId 1150] DEBUG hls: LOOKUP UP PERSISTENT FOR: False
haskell-language-server-wrapper: callProcess: /home/tchoutri/.ghcup/bin/haskell-language-server-8.10.7 "--debug" (exit 2): failed ```