Closed
Description
Subject of the issue
I want to use the feature that can evaluate expressions in comments and insert the output. However click on Evaluate...
does nothing.
Your environment
haskell-language-server version: 0.4.0.0 (GHC: 8.8.4) (PATH: /nix/store/qnv08wgw3m2f91pw6iknvydzdn9ramhy-haskell-language-server-0.4.0.0/bin/haskell-language-server)
Tool versions found on the $PATH
cabal: 3.2.0.0
stack: 2.3.3
ghc: 8.8.4
-
Which lsp-client do you use
- VSCode
-
Describe your project (alternative: link to the project)
I use Nix with Cabal. I have made a reproducable project and attached it.
sample-hls.zip -
Contents of
hie.yaml
cradle:
cabal:
- path: "./src"
component: "eval:lib:eval-hls"
- path: "./test"
component: "eval:test:Test"
Steps to reproduce
Start vscode. Wait till processing has finished. Make a comment with -- >>> 1 + 1
in one of the source files in test
and click Evaluate...
Expected behaviour
I expect the expression to be evaluated and inserted as a comment below it.
Actual behaviour
Nothing happens.
Include debug information
Debug output:
[nix-shell:~/engineering/sample-hls]$ haskell-language-server --debug
haskell-language-server version: 0.4.0.0 (GHC: 8.8.4) (PATH: /nix/store/qnv08wgw3m2f91pw6iknvydzdn9ramhy-haskell-language-server-0.4.0.0/bin/haskell-language-server)
(haskell-language-server)Ghcide setup tester in /home/rowan.goemans/engineering/sample-hls.
Report bugs at https://github.com/haskell/haskell-language-server/issues
Tool versions found on the $PATH
cabal: 3.2.0.0
stack: 2.3.3
ghc: 8.8.4
Step 1/4: Finding files to test in /home/rowan.goemans/engineering/sample-hls
Found 5 files
Step 2/4: Looking for hie.yaml files that control setup
Found 1 cradle
Step 3/4: Initializing the IDE
Step 4/4: Type checking the files
[INFO] Consulting the cradle for "/home/rowan.goemans/engineering/sample-hls/test/TestBar.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/rowan.goemans/engineering/sample-hls", cradleOptsProg = CradleAction: Cabal}
> Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
> update' to download it.RemoteRepo {remoteRepoName = "hackage.haskell.org",
> remoteRepoURI = http://hackage.haskell.org/, remoteRepoSecure = Just True,
> remoteRepoRootKeys =
> ["fe331502606802feac15e514d9b9ea83fee8b6ffef71335479a2e68d84adc6b0","1ea9ba32c526d1cc91ab5e5bd364ec5e9e8cb67179a471872f6e26f0ae773d42","2c6c3627bd6c982990239487f1abd02e08a02e6cf16edb105a8012d444d870c3","0a5c7ea47cd1b15f01f5f51a33adda7e655bc0f0b0615baa8e271f4c3351e21d","51f0161b906011b52c6613376b1ae937670da69322113a246a09f807c62f6921"],
> remoteRepoKeyThreshold = 3, remoteRepoShouldTryHttps = True}
> Resolving dependencies...
> Build profile: -w ghc-8.8.4 -O1
> In order, the following will be built (use -v for more details):
> - eval-0.1 (lib:eval-hls) (configuration changed)
> - eval-0.1 (test:Test) (configuration changed)
> Configuring library 'eval-hls' for eval-0.1..
> Preprocessing library 'eval-hls' for eval-0.1..
> Building library 'eval-hls' for eval-0.1..
> Configuring test suite 'Test' for eval-0.1..
> Preprocessing test suite 'Test' for eval-0.1..
[INFO] Using interface files cache dir: /home/rowan.goemans/.cache/ghcide/main-149a5e5c1c8a233536f327eed61c3ce115197272
[INFO] Making new HscEnv[main]
[INFO] Consulting the cradle for "/home/rowan.goemans/engineering/sample-hls/src/Bar.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/rowan.goemans/engineering/sample-hls", cradleOptsProg = CradleAction: Cabal}
> Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
> update' to download it.RemoteRepo {remoteRepoName = "hackage.haskell.org",
> remoteRepoURI = http://hackage.haskell.org/, remoteRepoSecure = Just True,
> remoteRepoRootKeys =
> ["fe331502606802feac15e514d9b9ea83fee8b6ffef71335479a2e68d84adc6b0","1ea9ba32c526d1cc91ab5e5bd364ec5e9e8cb67179a471872f6e26f0ae773d42","2c6c3627bd6c982990239487f1abd02e08a02e6cf16edb105a8012d444d870c3","0a5c7ea47cd1b15f01f5f51a33adda7e655bc0f0b0615baa8e271f4c3351e21d","51f0161b906011b52c6613376b1ae937670da69322113a246a09f807c62f6921"],
> remoteRepoKeyThreshold = 3, remoteRepoShouldTryHttps = True}
> Resolving dependencies...
> Build profile: -w ghc-8.8.4 -O1
> In order, the following will be built (use -v for more details):
> - eval-0.1 (lib:eval-hls) (configuration changed)
> Configuring library 'eval-hls' for eval-0.1..
> Preprocessing library 'eval-hls' for eval-0.1..
[INFO] Using interface files cache dir: /home/rowan.goemans/.cache/ghcide/eval-0.1-inplace-eval-hls-dd9719ecc21d699482a8d13f94da15d1dd12ab47
[INFO] Using interface files cache dir: /home/rowan.goemans/.cache/ghcide/main-ae1602a1dbaf9ac965b15f66d16278f15d01a186
[INFO] Making new HscEnv[eval-0.1-inplace-eval-hls,main]
Completed (5 files worked, 0 files failed)
LSP logs:
[client] run command: "haskell-language-server-wrapper --lsp"
[client] debug command: "haskell-language-server-wrapper --lsp"
[client] server cwd: undefined
Found "/home/rowan.goemans/engineering/sample-hls/hie.yaml" for "/home/rowan.goemans/engineering/sample-hls/a"
Module "/home/rowan.goemans/engineering/sample-hls/a" is loaded by Cradle: Cradle {cradleRootDir = "/home/rowan.goemans/engineering/sample-hls", cradleOptsProg = CradleAction: Cabal}
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 0.4.0.0 x86_64 ghc-8.8.4
Current directory: /home/rowan.goemans/engineering/sample-hls
Operating system: linux
Arguments: ["--lsp"]
Cradle directory: /home/rowan.goemans/engineering/sample-hls
Cradle type: Cabal
Tool versions found on the $PATH
cabal: 3.2.0.0
stack: 2.3.3
ghc: 8.8.4
Consulting the cradle to get project GHC version...
Project GHC version: 8.8.4
haskell-language-server exe candidates: ["haskell-language-server-8.8.4","haskell-language-server-8.8","haskell-language-server"]
Launching haskell-language-server exe at:/nix/store/qnv08wgw3m2f91pw6iknvydzdn9ramhy-haskell-language-server-0.4.0.0/bin/haskell-language-server-8.8.4
haskell-language-server version: 0.4.0.0 (GHC: 8.8.4) (PATH: /nix/store/qnv08wgw3m2f91pw6iknvydzdn9ramhy-haskell-language-server-0.4.0.0/bin/haskell-language-server)
Starting (haskell-language-server)LSP server...
with arguments: LspArguments {argLSP = True, argsCwd = Nothing, argFiles = [], argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = False, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
with plugins: [PluginId "brittany",PluginId "eval",PluginId "floskell",PluginId "fourmolu",PluginId "ghcide",PluginId "importLens",PluginId "ormolu",PluginId "pragmas",PluginId "retrie",PluginId "stylish-haskell"]
in directory: /home/rowan.goemans/engineering/sample-hls
If you are seeing this in a terminal, you probably should have run ghcide WITHOUT the --lsp option!
Started LSP server in 0.00s
2020-10-09 12:38:45.436190978 [ThreadId 17] - Opened text document: file:///home/rowan.goemans/engineering/sample-hls/test/Test.hs
2020-10-09 12:38:45.436664655 [ThreadId 17] - Opened text document: file:///home/rowan.goemans/engineering/sample-hls/test/TestFoo.hs
2020-10-09 12:38:45.43703122 [ThreadId 17] - Opened text document: file:///home/rowan.goemans/engineering/sample-hls/test/TestBar.hs
2020-10-09 12:38:45.437722118 [ThreadId 61] - Consulting the cradle for "/home/rowan.goemans/engineering/sample-hls/test/TestBar.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/rowan.goemans/engineering/sample-hls", cradleOptsProg = CradleAction: Cabal}
> Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
> update' to download it.RemoteRepo {remoteRepoName = "hackage.haskell.org",
> remoteRepoURI = http://hackage.haskell.org/, remoteRepoSecure = Just True,
> remoteRepoRootKeys =
> ["fe331502606802feac15e514d9b9ea83fee8b6ffef71335479a2e68d84adc6b0","1ea9ba32c526d1cc91ab5e5bd364ec5e9e8cb67179a471872f6e26f0ae773d42","2c6c3627bd6c982990239487f1abd02e08a02e6cf16edb105a8012d444d870c3","0a5c7ea47cd1b15f01f5f51a33adda7e655bc0f0b0615baa8e271f4c3351e21d","51f0161b906011b52c6613376b1ae937670da69322113a246a09f807c62f6921"],
> remoteRepoKeyThreshold = 3, remoteRepoShouldTryHttps = True}
> Resolving dependencies...
2020-10-09 12:38:46.05628159 [ThreadId 80] - Plugin.makeCodeLens (ideLogger)
> Build profile: -w ghc-8.8.4 -O1
> In order, the following will be built (use -v for more details):
> - eval-0.1 (lib:eval-hls) (configuration changed)
> - eval-0.1 (test:Test) (configuration changed)
> Configuring library 'eval-hls' for eval-0.1..
> Preprocessing library 'eval-hls' for eval-0.1..
> Building library 'eval-hls' for eval-0.1..
> Configuring test suite 'Test' for eval-0.1..
> Preprocessing test suite 'Test' for eval-0.1..
2020-10-09 12:38:48.836885877 [ThreadId 61] - Using interface files cache dir: /home/rowan.goemans/.cache/ghcide/main-149a5e5c1c8a233536f327eed61c3ce115197272
2020-10-09 12:38:48.837125531 [ThreadId 61] - Making new HscEnv[main]
2020-10-09 12:39:00.588592988 [ThreadId 209] - finish: CodeAction (took 0.00s)
2020-10-09 12:39:00.811987425 [ThreadId 221] - Plugin.makeCodeLens (ideLogger)
2020-10-09 12:39:00.812296655 [ThreadId 222] - finish: codeLens (took 0.00s)
2020-10-09 12:39:00.812738382 [ThreadId 224] - finish: importLens (took 0.00s)
2020-10-09 12:39:00.81290956 [ThreadId 226] - finish: importLens (took 0.00s)
2020-10-09 12:39:00.930430867 [ThreadId 230] - finish: CodeAction:PackageExports (took 0.34s)
2020-10-09 12:39:02.000354862 [ThreadId 233] - finish: CodeAction (took 0.00s)
2020-10-09 12:39:02.000460267 [ThreadId 235] - finish: CodeAction:PackageExports (took 0.00s)
2020-10-09 12:39:02.080490892 [ThreadId 17] - Modified text document: file:///home/rowan.goemans/engineering/sample-hls/test/Test.hs
2020-10-09 12:39:02.175163815 [ThreadId 17] - Modified text document: file:///home/rowan.goemans/engineering/sample-hls/test/Test.hs
2020-10-09 12:39:02.407876223 [ThreadId 423] - Plugin.makeCodeLens (ideLogger)
2020-10-09 12:39:02.40856693 [ThreadId 424] - finish: codeLens (took 0.00s)
2020-10-09 12:39:02.409295028 [ThreadId 426] - finish: importLens (took 0.00s)
2020-10-09 12:39:02.40950589 [ThreadId 428] - finish: importLens (took 0.00s)
2020-10-09 12:39:02.495309978 [ThreadId 17] - Modified text document: file:///home/rowan.goemans/engineering/sample-hls/test/Test.hs
2020-10-09 12:39:02.747107319 [ThreadId 468] - Plugin.makeCodeLens (ideLogger)
2020-10-09 12:39:02.748525362 [ThreadId 469] - finish: codeLens (took 0.00s)
2020-10-09 12:39:02.749584281 [ThreadId 471] - finish: importLens (took 0.00s)
2020-10-09 12:39:02.752464665 [ThreadId 519] - finish: importLens (took 0.00s)
2020-10-09 12:39:02.753491782 [ThreadId 523] - finish: CodeAction (took 0.00s)
2020-10-09 12:39:02.753822533 [ThreadId 528] - finish: CodeAction:PackageExports (took 0.00s)
2020-10-09 12:39:02.901536688 [ThreadId 17] - Modified text document: file:///home/rowan.goemans/engineering/sample-hls/test/Test.hs
2020-10-09 12:39:03.146080476 [ThreadId 631] - Plugin.makeCodeLens (ideLogger)
2020-10-09 12:39:03.146485644 [ThreadId 632] - finish: codeLens (took 0.00s)
2020-10-09 12:39:03.14680125 [ThreadId 634] - finish: importLens (took 0.00s)
2020-10-09 12:39:03.146977489 [ThreadId 636] - finish: importLens (took 0.00s)
2020-10-09 12:39:03.273473229 [ThreadId 17] - Modified text document: file:///home/rowan.goemans/engineering/sample-hls/test/Test.hs
2020-10-09 12:39:03.417190965 [ThreadId 17] - Modified text document: file:///home/rowan.goemans/engineering/sample-hls/test/Test.hs
2020-10-09 12:39:03.563958481 [ThreadId 17] - Modified text document: file:///home/rowan.goemans/engineering/sample-hls/test/Test.hs
2020-10-09 12:39:03.673190034 [ThreadId 17] - Modified text document: file:///home/rowan.goemans/engineering/sample-hls/test/Test.hs
2020-10-09 12:39:03.911738236 [ThreadId 994] - Plugin.makeCodeLens (ideLogger)
2020-10-09 12:39:03.912108402 [ThreadId 995] - finish: codeLens (took 0.00s)
2020-10-09 12:39:03.912693459 [ThreadId 997] - finish: importLens (took 0.00s)
2020-10-09 12:39:03.912764627 [ThreadId 999] - finish: importLens (took 0.00s)
2020-10-09 12:39:03.913114136 [ThreadId 1004] - finish: CodeAction (took 0.00s)
2020-10-09 12:39:03.913343199 [ThreadId 1009] - finish: CodeAction:PackageExports (took 0.00s)
2020-10-09 12:39:03.965447794 [ThreadId 17] - Modified text document: file:///home/rowan.goemans/engineering/sample-hls/test/Test.hs
2020-10-09 12:39:04.086370879 [ThreadId 17] - Modified text document: file:///home/rowan.goemans/engineering/sample-hls/test/Test.hs
2020-10-09 12:39:04.208548215 [ThreadId 17] - Modified text document: file:///home/rowan.goemans/engineering/sample-hls/test/Test.hs
2020-10-09 12:39:04.447285748 [ThreadId 1278] - Plugin.makeCodeLens (ideLogger)
2020-10-09 12:39:04.44766887 [ThreadId 1279] - finish: codeLens (took 0.00s)
2020-10-09 12:39:04.447982783 [ThreadId 1281] - finish: importLens (took 0.00s)
2020-10-09 12:39:04.448064779 [ThreadId 1283] - finish: importLens (took 0.00s)
2020-10-09 12:39:04.448369596 [ThreadId 1288] - finish: CodeAction (took 0.00s)
2020-10-09 12:39:04.448673802 [ThreadId 1293] - finish: CodeAction:PackageExports (took 0.00s)
2020-10-09 12:39:04.711934238 [ThreadId 17] - Modified text document: file:///home/rowan.goemans/engineering/sample-hls/test/Test.hs
2020-10-09 12:39:04.790604212 [ThreadId 17] - Modified text document: file:///home/rowan.goemans/engineering/sample-hls/test/Test.hs
2020-10-09 12:39:04.923302866 [ThreadId 17] - Modified text document: file:///home/rowan.goemans/engineering/sample-hls/test/Test.hs
2020-10-09 12:39:05.162648653 [ThreadId 1569] - Plugin.makeCodeLens (ideLogger)
2020-10-09 12:39:05.16300054 [ThreadId 1570] - finish: codeLens (took 0.00s)
2020-10-09 12:39:05.163273009 [ThreadId 1572] - finish: importLens (took 0.00s)
2020-10-09 12:39:05.163425497 [ThreadId 1574] - finish: importLens (took 0.00s)
2020-10-09 12:39:05.22207568 [ThreadId 17] - Modified text document: file:///home/rowan.goemans/engineering/sample-hls/test/Test.hs
2020-10-09 12:39:05.342962863 [ThreadId 17] - Modified text document: file:///home/rowan.goemans/engineering/sample-hls/test/Test.hs
2020-10-09 12:39:05.450180131 [ThreadId 17] - Modified text document: file:///home/rowan.goemans/engineering/sample-hls/test/Test.hs
2020-10-09 12:39:05.575821943 [ThreadId 17] - Modified text document: file:///home/rowan.goemans/engineering/sample-hls/test/Test.hs
2020-10-09 12:39:05.7311046 [ThreadId 17] - Modified text document: file:///home/rowan.goemans/engineering/sample-hls/test/Test.hs
2020-10-09 12:39:05.83819125 [ThreadId 17] - Modified text document: file:///home/rowan.goemans/engineering/sample-hls/test/Test.hs
2020-10-09 12:39:06.086976756 [ThreadId 2104] - Plugin.makeCodeLens (ideLogger)
2020-10-09 12:39:06.087310391 [ThreadId 2105] - finish: codeLens (took 0.00s)
2020-10-09 12:39:06.087720574 [ThreadId 2107] - finish: importLens (took 0.00s)
2020-10-09 12:39:06.087798513 [ThreadId 2109] - finish: importLens (took 0.00s)
2020-10-09 12:39:06.088213633 [ThreadId 2114] - finish: CodeAction (took 0.00s)
2020-10-09 12:39:06.088976965 [ThreadId 2119] - finish: CodeAction:PackageExports (took 0.00s)
2020-10-09 12:39:06.307663384 [ThreadId 17] - Modified text document: file:///home/rowan.goemans/engineering/sample-hls/test/Test.hs
2020-10-09 12:39:06.483766263 [ThreadId 17] - Modified text document: file:///home/rowan.goemans/engineering/sample-hls/test/Test.hs
2020-10-09 12:39:06.592693356 [ThreadId 17] - Modified text document: file:///home/rowan.goemans/engineering/sample-hls/test/Test.hs
2020-10-09 12:39:06.663534378 [ThreadId 17] - Modified text document: file:///home/rowan.goemans/engineering/sample-hls/test/Test.hs
2020-10-09 12:39:06.901814126 [ThreadId 2480] - Plugin.makeCodeLens (ideLogger)
2020-10-09 12:39:06.902219694 [ThreadId 2481] - finish: codeLens (took 0.00s)
2020-10-09 12:39:06.902689965 [ThreadId 2485] - finish: importLens (took 0.00s)
2020-10-09 12:39:06.902632293 [ThreadId 2483] - finish: importLens (took 0.00s)
2020-10-09 12:39:06.903177235 [ThreadId 2490] - finish: CodeAction (took 0.00s)
2020-10-09 12:39:06.90345579 [ThreadId 2495] - finish: CodeAction:PackageExports (took 0.00s)
2020-10-09 12:39:07.903801258 [ThreadId 2508] - finish: runEvalCmd.ghcSession (took 0.00s)
2020-10-09 12:39:07.903897573 [ThreadId 2510] - finish: runEvalCmd.getModSummary (took 0.00s)
[Error - 12:39:07 PM] Request workspace/executeCommand failed.
Message: These modules are needed for compilation but not listed in your .cabal file's other-modules:
TestBar TestFooCould not find module ‘TestFoo’
It is not a module in the current program, or in any known package.Could not find module ‘TestBar’
It is not a module in the current program, or in any known package.
Code: -32603
2020-10-09 12:39:08.500577303 [ThreadId 2514] - GhcIde.hover entered (ideLogger)