You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently using lsp-test library and instructions provided while trying to extend hls/ghcide. I was trying to start with the simple examples provided on the lsp-test wiki/github pages. When, I try to execute the simplest example, I see that a 'shutdown' command is sent immediately.
So, far I have gone through tests inside ghcide to see if there is something different being done to avoid this situation. I just cam across the use of ( >> expectNoMoreDiagnostics 0.5), but even that does not seem to help.
Am I doing something wrong?
Subject of the issue
shutdown message sent my test-lsp while trying to write a simple test.
Your environment
Output of haskell-language-server --probe-tools or haskell-language-server-wrapper --probe-tools
cabal: 2.4.1.0
stack: 2.3.1
ghc: 8.8.3
Which lsp-client do you use
lsp-test library
Describe your project (alternative: link to the project)
test-lsp-exe: Couldn't decode response for the request type: Shutdown
"{\"result\":null,\"jsonrpc\":\"2.0\",\"id\":0}"
CallStack (from HasCallStack):
error, called at src/Language/Haskell/LSP/Test/Decoding.hs:120:32 in lsp-test-0.6.1.0-F6ZpWvHwbB8IOsvsvivYhC:Language.Haskell.LSP.Test.Decoding
Steps to reproduce
Running this code sends the 'textDocument/didOpen' method and then immediately send ''shutdown' method.
Expected behaviour
I would expect to be able to use the return value from openDoc to send further requests.
haskell-language-server version: 0.4.0.0 (GHC: 8.6.5) (PATH: /home/projectdir/hls/.stack-work/install/x86_64-linux/24d08e207078ccd6be7414f4a4f95bd8b39e9f8383f7062388065ca9690064e0/8.6.5/bin/haskell-language-server) (GIT hash: 1d1ab3bad0d6d0528b8cdeaa697836b18508b596)
(haskell-language-server)Ghcide setup tester in /home/projectdir/haskell-scratch.
Report bugs at https://github.com/haskell/haskell-language-server/issues
Tool versions found on the $PATH
cabal: 2.4.1.0
stack: 2.3.1
ghc: 8.8.3
Step 1/4: Finding files to test in /home/projectdir/haskell-scratch
Found 7 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/projectdir/haskell-scratch/src/Lib.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/projectdir/haskell-scratch", cradleOptsProg = CradleAction: Stack}
> haskell-scratch> configure (lib + exe)
> Configuring haskell-scratch-0.1.0.0...
> haskell-scratch> initial-build-steps (lib + exe)
> Configuring GHCi with the following packages: haskell-scratch
> /home/projectdir/haskell-scratch/.stack-work/install/x86_64-linux/6bd03d3d5aa2731befe8d581bb72b77c811fbf366241823de3e19a5b0ebb420e/8.6.5/pkgdb:/home/foouser/.stack/snapshots/x86_64-linux/6bd03d3d5aa2731befe8d581bb72b77c811fbf366241823de3e19a5b0ebb420e/8.6.5/pkgdb:/home/foouser/.stack/programs/x86_64-linux/ghc-8.6.5/lib/ghc-8.6.5/package.conf.d
[INFO] Using interface files cache dir: /home/foouser/.cache/ghcide/main-e9952cbdc286fc435c93089a3556ddb602aaa0b5
[INFO] Making new HscEnv[main]
[INFO] Consulting the cradle for "/home/projectdir/haskell-scratch/app/test-lsp.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/projectdir/haskell-scratch", cradleOptsProg = CradleAction: Stack}
> Using main module: 1. Package `haskell-scratch' component haskell-scratch:exe:test-lsp-exe with main-is file: /home/projectdir/haskell-scratch/app/test-lsp.hs
> haskell-scratch> configure (lib + exe)
> Configuring haskell-scratch-0.1.0.0...
> haskell-scratch> initial-build-steps (lib + exe)
> The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
> Configuring GHCi with the following packages: haskell-scratch
> /home/projectdir/haskell-scratch/.stack-work/install/x86_64-linux/6bd03d3d5aa2731befe8d581bb72b77c811fbf366241823de3e19a5b0ebb420e/8.6.5/pkgdb:/home/foouser/.stack/snapshots/x86_64-linux/6bd03d3d5aa2731befe8d581bb72b77c811fbf366241823de3e19a5b0ebb420e/8.6.5/pkgdb:/home/foouser/.stack/programs/x86_64-linux/ghc-8.6.5/lib/ghc-8.6.5/package.conf.d
[INFO] Using interface files cache dir: /home/foouser/.cache/ghcide/main-a2d526d4313478529253b6a17980d618b7198e76
[INFO] Using interface files cache dir: /home/foouser/.cache/ghcide/main-a2d526d4313478529253b6a17980d618b7198e76
[INFO] Making new HscEnv[main,main]
[INFO] Consulting the cradle for "/home/projectdir/haskell-scratch/app/main.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/projectdir/haskell-scratch", cradleOptsProg = CradleAction: Stack}
> Using main module: 1. Package `haskell-scratch' component haskell-scratch:exe:haskell-scratch-exe with main-is file: /home/projectdir/haskell-scratch/app/main.hs
> haskell-scratch> configure (lib + exe)
> Configuring haskell-scratch-0.1.0.0...
> haskell-scratch> initial-build-steps (lib + exe)
> The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
> Configuring GHCi with the following packages: haskell-scratch
> /home/projectdir/haskell-scratch/.stack-work/install/x86_64-linux/6bd03d3d5aa2731befe8d581bb72b77c811fbf366241823de3e19a5b0ebb420e/8.6.5/pkgdb:/home/foouser/.stack/snapshots/x86_64-linux/6bd03d3d5aa2731befe8d581bb72b77c811fbf366241823de3e19a5b0ebb420e/8.6.5/pkgdb:/home/foouser/.stack/programs/x86_64-linux/ghc-8.6.5/lib/ghc-8.6.5/package.conf.d
[INFO] Using interface files cache dir: /home/foouser/.cache/ghcide/main-33322b2a0d073962cdeed87e764f3d1ded942ce9
[INFO] Using interface files cache dir: /home/foouser/.cache/ghcide/main-33322b2a0d073962cdeed87e764f3d1ded942ce9
[INFO] Using interface files cache dir: /home/foouser/.cache/ghcide/main-33322b2a0d073962cdeed87e764f3d1ded942ce9
[INFO] Making new HscEnv[main,main,main]
[INFO] Consulting the cradle for "/home/projectdir/haskell-scratch/Setup.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/projectdir/haskell-scratch", cradleOptsProg = CradleAction: Stack}
File: /home/projectdir/haskell-scratch/Setup.hs
Hidden: no
Range: 1:0-2:0
Source: cradle
Severity: DsError
Message:
�[0;91mMulti Cradle: No prefixes matched
pwd: /home/projectdir/haskell-scratch
filepath: /home/projectdir/haskell-scratch/Setup.hs
prefixes:
("./src",Stack {component = Just "haskell-scratch:lib"})
("././app/datatypes-alacarte.hs",Stack {component = Just
"haskell-scratch:exe:datatypes-alacarte-exe"})
("././Paths_haskell_scratch.hs",Stack {component = Just
"haskell-scratch:exe:datatypes-alacarte-exe"})
("././app/main.hs",Stack {component = Just "haskell-scratch:exe:haskell-scratch-exe"})
("././Paths_haskell_scratch.hs",Stack {component = Just
"haskell-scratch:exe:haskell-scratch-exe"})
("././app/test-lsp.hs",Stack {component = Just "haskell-scratch:exe:test-lsp-exe"})
("././Paths_haskell_scratch.hs",Stack {component = Just "haskell-scratch:exe:test-lsp-exe"})
("./test",Stack {component = Just "haskell-scratch:test:haskell-scratch-test"})�[0m
[INFO] Consulting the cradle for "/home/projectdir/haskell-scratch/app/[email protected]:1599772457"
Output from setting up the cradle Cradle {cradleRootDir = "/home/projectdir/haskell-scratch", cradleOptsProg = CradleAction: Stack}
File: /home/projectdir/haskell-scratch/app/[email protected]:1599772457
Hidden: no
Range: 1:0-2:0
Source: cradle
Severity: DsError
Message:
�[0;91mMulti Cradle: No prefixes matched
pwd: /home/projectdir/haskell-scratch
filepath: /home/projectdir/haskell-scratch/app/[email protected]:1599772457
prefixes:
("./src",Stack {component = Just "haskell-scratch:lib"})
("././app/datatypes-alacarte.hs",Stack {component = Just
"haskell-scratch:exe:datatypes-alacarte-exe"})
("././Paths_haskell_scratch.hs",Stack {component = Just
"haskell-scratch:exe:datatypes-alacarte-exe"})
("././app/main.hs",Stack {component = Just "haskell-scratch:exe:haskell-scratch-exe"})
("././Paths_haskell_scratch.hs",Stack {component = Just
"haskell-scratch:exe:haskell-scratch-exe"})
("././app/test-lsp.hs",Stack {component = Just "haskell-scratch:exe:test-lsp-exe"})
("././Paths_haskell_scratch.hs",Stack {component = Just "haskell-scratch:exe:test-lsp-exe"})
("./test",Stack {component = Just "haskell-scratch:test:haskell-scratch-test"})�[0m
[INFO] Consulting the cradle for "/home/projectdir/haskell-scratch/app/datatypes-alacarte.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/projectdir/haskell-scratch", cradleOptsProg = CradleAction: Stack}
> Using main module: 1. Package `haskell-scratch' component haskell-scratch:exe:datatypes-alacarte-exe with main-is file: /home/projectdir/haskell-scratch/app/datatypes-alacarte.hs
> haskell-scratch> configure (lib + exe)
> Configuring haskell-scratch-0.1.0.0...
> haskell-scratch> initial-build-steps (lib + exe)
> The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
> Configuring GHCi with the following packages: haskell-scratch
> /home/projectdir/haskell-scratch/.stack-work/install/x86_64-linux/6bd03d3d5aa2731befe8d581bb72b77c811fbf366241823de3e19a5b0ebb420e/8.6.5/pkgdb:/home/foouser/.stack/snapshots/x86_64-linux/6bd03d3d5aa2731befe8d581bb72b77c811fbf366241823de3e19a5b0ebb420e/8.6.5/pkgdb:/home/foouser/.stack/programs/x86_64-linux/ghc-8.6.5/lib/ghc-8.6.5/package.conf.d
[INFO] Using interface files cache dir: /home/foouser/.cache/ghcide/main-c4fd1db97bfc19a35e00fb51bb42880ec41b2dec
[INFO] Using interface files cache dir: /home/foouser/.cache/ghcide/main-c4fd1db97bfc19a35e00fb51bb42880ec41b2dec
[INFO] Using interface files cache dir: /home/foouser/.cache/ghcide/main-c4fd1db97bfc19a35e00fb51bb42880ec41b2dec
[INFO] Using interface files cache dir: /home/foouser/.cache/ghcide/main-c4fd1db97bfc19a35e00fb51bb42880ec41b2dec
[INFO] Making new HscEnv[main,main,main,main]
[INFO] Consulting the cradle for "/home/projectdir/haskell-scratch/Setup.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/projectdir/haskell-scratch", cradleOptsProg = CradleAction: Stack}
[INFO] Consulting the cradle for "/home/projectdir/haskell-scratch/app/[email protected]:1599772457"
Output from setting up the cradle Cradle {cradleRootDir = "/home/projectdir/haskell-scratch", cradleOptsProg = CradleAction: Stack}
[INFO] Consulting the cradle for "/home/projectdir/haskell-scratch/test/Spec.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/projectdir/haskell-scratch", cradleOptsProg = CradleAction: Stack}
> Using main module: 1. Package `haskell-scratch' component haskell-scratch:test:haskell-scratch-test with main-is file: /home/projectdir/haskell-scratch/test/Spec.hs
> haskell-scratch> configure (lib + exe)
> Configuring haskell-scratch-0.1.0.0...
> haskell-scratch> initial-build-steps (lib + exe)
> The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
> Configuring GHCi with the following packages: haskell-scratch
>
> Warning: Didn't find expected autogen file:
> /home/projectdir/haskell-scratch/.stack-work/dist/x86_64-linux/Cabal-2.4.0.1/build/haskell-scratch-test/autogen/cabal_macros.h
> /home/projectdir/haskell-scratch/.stack-work/install/x86_64-linux/6bd03d3d5aa2731befe8d581bb72b77c811fbf366241823de3e19a5b0ebb420e/8.6.5/pkgdb:/home/foouser/.stack/snapshots/x86_64-linux/6bd03d3d5aa2731befe8d581bb72b77c811fbf366241823de3e19a5b0ebb420e/8.6.5/pkgdb:/home/foouser/.stack/programs/x86_64-linux/ghc-8.6.5/lib/ghc-8.6.5/package.conf.d
[INFO] Using interface files cache dir: /home/foouser/.cache/ghcide/main-70c8fb3574fcf2be2d0fc89a5880b71d3f3cedc6
[INFO] Using interface files cache dir: /home/foouser/.cache/ghcide/main-70c8fb3574fcf2be2d0fc89a5880b71d3f3cedc6
[INFO] Using interface files cache dir: /home/foouser/.cache/ghcide/main-70c8fb3574fcf2be2d0fc89a5880b71d3f3cedc6
[INFO] Using interface files cache dir: /home/foouser/.cache/ghcide/main-70c8fb3574fcf2be2d0fc89a5880b71d3f3cedc6
[INFO] Using interface files cache dir: /home/foouser/.cache/ghcide/main-70c8fb3574fcf2be2d0fc89a5880b71d3f3cedc6
[INFO] Making new HscEnv[main,main,main,main,main]
[INFO] Consulting the cradle for "/home/projectdir/haskell-scratch/Setup.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/projectdir/haskell-scratch", cradleOptsProg = CradleAction: Stack}
[INFO] Consulting the cradle for "/home/projectdir/haskell-scratch/app/[email protected]:1599772457"
Output from setting up the cradle Cradle {cradleRootDir = "/home/projectdir/haskell-scratch", cradleOptsProg = CradleAction: Stack}
Files that failed:
* /home/projectdir/haskell-scratch/Setup.hs
* /home/projectdir/haskell-scratch/app/[email protected]:1599772457
Completed (5 files worked, 2 files failed)
The text was updated successfully, but these errors were encountered:
* Change the representation of filestamps
This is needed to be able to compare them, which we want to use for loading
.hie and .hi files
* Update src/Development/IDE/Core/FileStore.hs
Co-Authored-By: Neil Mitchell <[email protected]>
Co-authored-by: Neil Mitchell <[email protected]>
(This is more of a support issue, I think)
I am currently using lsp-test library and instructions provided while trying to extend hls/ghcide. I was trying to start with the simple examples provided on the lsp-test wiki/github pages. When, I try to execute the simplest example, I see that a 'shutdown' command is sent immediately.
So, far I have gone through tests inside ghcide to see if there is something different being done to avoid this situation. I just cam across the use of
( >> expectNoMoreDiagnostics 0.5)
, but even that does not seem to help.Am I doing something wrong?
Subject of the issue
shutdown message sent my test-lsp while trying to write a simple test.
Your environment
haskell-language-server --probe-tools
orhaskell-language-server-wrapper --probe-tools
cabal: 2.4.1.0
stack: 2.3.1
ghc: 8.8.3
Which lsp-client do you use
lsp-test library
Describe your project (alternative: link to the project)
Here is the outout of this script
Steps to reproduce
Running this code sends the 'textDocument/didOpen' method and then immediately send ''shutdown' method.
Expected behaviour
I would expect to be able to use the return value from openDoc to send further requests.
Actual behaviour
'shutdown' method sent too early.
here is the lsp log.
Include debug information
The text was updated successfully, but these errors were encountered: