-
Notifications
You must be signed in to change notification settings - Fork 93
Closed
Labels
type: bugA bug or unintended effectA bug or unintended effecttype: setupIssues related with the extension setup, including binaries downloadsIssues related with the extension setup, including binaries downloads
Description
Your environment
OSx Mojave 10.14.6
Steps to reproduce
$ stack upgrade
$ stack --version
Version 2.7.3, Git revision 7927a3aec32e2b2e5e4fb5be76d0d50eddcc197f x86_64 hpack-0.34.4
$ ghcup upgrade
$ ghcup --version
The GHCup Haskell installer, version v0.1.13
$ ghcup install hls
[ Warn ] HLS ver 1.0.0 already installed; if you really want to reinstall it, you may want to run 'ghcup rm hls 1.0.0' first
$ stack new my-new-project
Then open my-new-project in VSCode.
Expected behaviour
The language server should not crash with error Cannot read property 'range' of undefined: TypeError: Cannot read property 'range' of undefined.
Actual behaviour
VSCode notification pops up:
The Haskell my-new-project server crashed 5 times in the last 3 minutes. The server will not be restarted.
Note, that if I just write a single Haskell script that does not declare any modules, then the VSCode extension works find (syntax highlighting, fix suggestions, go to def, etc).
Include debug information
Execute in the root of your project the command haskell-language-server-wrapper --debug . and paste the logs here (you can find the executable location here):
Debug output:
Module "/Users/user/Code/my-new-project/a" is loaded by Cradle: Cradle {cradleRootDir = "/Users/users/Code/my-new-project", cradleOptsProg = CradleAction: Stack}
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 1.0.0.0, Git revision 4cd1cf934638881e52b3eba9f70157a4b799c0e9 (dirty) x86_64 ghc-8.10.4
Current directory: /Users/users/Code/my-new-project
Operating system: darwin
Arguments: ["--debug","."]
Cradle directory: /Users/users/Code/my-new-project
Cradle type: Stack
Tool versions found on the $PATH
cabal: 3.4.0.0
stack: 2.7.3
ghc: 8.10.4
Consulting the cradle to get project GHC version...
Project GHC version: 8.10.7
haskell-language-server exe candidates: ["haskell-language-server-8.10.7","haskell-language-server-8.10","haskell-language-server"]
Cannot find any haskell-language-server exe, looked for: haskell-language-server-8.10.7, haskell-language-server-8.10, haskell-language-server
Paste the contents of extension specific log, you can check instructions about how to find it here
Extension log:
[2022-01-10 09:11:21.264] [renderer3] [error] Cannot read property 'range' of undefined: TypeError: Cannot read property 'range' of undefined
at H (/Users/user/.vscode/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1129652)
at /Users/user/.vscode/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1135046
at Array.map (<anonymous>)
at Object.asSymbolInformations (/Users/user/.vscode/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1135038)
at /Users/user/.vscode/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1061226
at async s.provideDocumentSymbols (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:95:87704)
[2022-01-10 09:11:26.481] [renderer3] [error] Cannot read property 'range' of undefined: TypeError: Cannot read property 'range' of undefined
at H (/Users/user/.vscode/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1129652)
at /Users/user/.vscode/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1135046
at Array.map (<anonymous>)
at Object.asSymbolInformations (/Users/user/.vscode/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1135038)
at /Users/user/.vscode/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1061226
at async s.provideDocumentSymbols (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:95:87704)
Metadata
Metadata
Assignees
Labels
type: bugA bug or unintended effectA bug or unintended effecttype: setupIssues related with the extension setup, including binaries downloadsIssues related with the extension setup, including binaries downloads