vscode-haskell icon indicating copy to clipboard operation
vscode-haskell copied to clipboard

VScode doesn't recognize HLS installation

Open Momentum93 opened this issue 2 years ago • 2 comments

base Configuration: ->completely new Installation of pop-os, haskell (through ghcup), vscode, ... -> vscode extensions: Haskell, Haskell Syntax Highlighting, haskell-linter

Test(Bug?)-Setup: ->Tested both with and without a cabal project (haven't tested it with stack, but shouldn't make any difference in this case...)

Problem(Bug?) Description: ->vscode doesn't recognize/find the installed hsl (-version?)...

GHCUP-Screenshot && VScode-Log Screenshots: ghc_up

HLS has only one (green) check mark...? Any other installation has two ->does this mean anything?

2023-09-27 12:06:54.5120000 [client] DEBUG Environment variables:
2023-09-27 12:06:54.5130000 [client] DEBUG   PATH: /home/thomas/.cabal/bin:/home/thomas/.ghcup/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
2023-09-27 12:06:54.5130000 [client] INFO Finding haskell-language-server
2023-09-27 12:06:54.5140000 [client] INFO Checking for ghcup installation
2023-09-27 12:06:54.5290000 [client] INFO found ghcup at ghcup
2023-09-27 12:06:54.5290000 [client] INFO Executing 'ghcup --no-verbose upgrade' in cwd '/home/thomas'
2023-09-27 12:06:54.6840000 [client] DEBUG Execution of 'ghcup --no-verbose upgrade' terminated with code 0
2023-09-27 12:06:54.6840000 [client] INFO Checking for ghcup installation
2023-09-27 12:06:54.6970000 [client] INFO found ghcup at ghcup
2023-09-27 12:06:54.6990000 [client] INFO Executing 'ghcup --no-verbose list -t hls -c installed -r' in cwd '/home/thomas'
2023-09-27 12:06:54.8370000 [client] DEBUG Execution of 'ghcup --no-verbose list -t hls -c installed -r' terminated with code 0
2023-09-27 12:06:54.8380000 [client] INFO Checking for ghcup installation
2023-09-27 12:06:54.8570000 [client] INFO found ghcup at ghcup
2023-09-27 12:06:54.8590000 [client] INFO Executing 'ghcup --no-verbose list -t cabal -c installed -r' in cwd '/home/thomas'
2023-09-27 12:06:54.9800000 [client] DEBUG Execution of 'ghcup --no-verbose list -t cabal -c installed -r' terminated with code 0
2023-09-27 12:06:54.9810000 [client] INFO Checking for ghcup installation
2023-09-27 12:06:54.9970000 [client] INFO found ghcup at ghcup
2023-09-27 12:06:54.9980000 [client] INFO Executing 'ghcup --no-verbose list -t stack -c installed -r' in cwd '/home/thomas'
2023-09-27 12:06:55.1040000 [client] DEBUG Execution of 'ghcup --no-verbose list -t stack -c installed -r' terminated with code 0
2023-09-27 12:06:55.1160000 [client] INFO Checking for ghcup installation
2023-09-27 12:06:55.1340000 [client] INFO found ghcup at ghcup
2023-09-27 12:06:55.1350000 [client] INFO Executing 'ghcup --no-verbose whereis hls 2.2.0.0' in cwd '/home/thomas'
2023-09-27 12:06:55.1690000 [client] DEBUG Execution of 'ghcup --no-verbose whereis hls 2.2.0.0' terminated with code 0
2023-09-27 12:06:55.1690000 [client] INFO Checking for ghcup installation
2023-09-27 12:06:55.1890000 [client] INFO found ghcup at ghcup
2023-09-27 12:06:55.1900000 [client] INFO Executing 'ghcup --no-verbose whereis cabal 3.6.2.0' in cwd '/home/thomas'
2023-09-27 12:06:55.2410000 [client] DEBUG Execution of 'ghcup --no-verbose whereis cabal 3.6.2.0' terminated with code 0
2023-09-27 12:06:55.2410000 [client] INFO Checking for ghcup installation
2023-09-27 12:06:55.2540000 [client] INFO found ghcup at ghcup
2023-09-27 12:06:55.2550000 [client] INFO Executing 'ghcup --no-verbose whereis stack 2.9.3' in cwd '/home/thomas'
2023-09-27 12:06:55.3020000 [client] DEBUG Execution of 'ghcup --no-verbose whereis stack 2.9.3' terminated with code 0
2023-09-27 12:06:55.3160000 [client] INFO Executing 'ghc --numeric-version' in cwd '/home/thomas'
2023-09-27 12:06:55.3900000 [client] DEBUG Execution of 'ghc --numeric-version' terminated with code 0
2023-09-27 12:06:55.3910000 [client] INFO Checking for ghcup installation
2023-09-27 12:06:55.4020000 [client] INFO found ghcup at ghcup
2023-09-27 12:06:55.4030000 [client] INFO Executing 'ghcup --no-verbose run --hls 2.2.0.0 --cabal 3.6.2.0 --stack 2.9.3 --install' in cwd '/home/thomas'
2023-09-27 12:06:55.5430000 [client] DEBUG Execution of 'ghcup --no-verbose run --hls 2.2.0.0 --cabal 3.6.2.0 --stack 2.9.3 --install' terminated with code 27
2023-09-27 12:06:55.5440000 [client] ERROR Error executing 'ghcup --no-verbose run --hls 2.2.0.0 --cabal 3.6.2.0 --stack 2.9.3 --install' with error code 27
2023-09-27 12:06:55.5440000 [client] ERROR stderr: [1m[ Error ][0m []8;;https://errors.haskell.org/messages/GHCup-00130\GHCup-00130]8;;\] The version 2.2.0.0 of the tool hls is not installed.


Momentum93 avatar Sep 27 '23 12:09 Momentum93

Try "setting" HLS by pressing 'S' after selecting HLS 2.2.0.0(or 2.3.0.0, which is the latest version)

openingnow avatar Oct 04 '23 03:10 openingnow

Hi, thank you for your bug report!

Setting HLS as active is not necessary for the VSCode extension to work properly. From the logs, it seems the command ghcup --no-verbose run --hls 2.2.0.0 --cabal 3.6.2.0 --stack 2.9.3 --install failed to execute in your home directory.

This seems quite weird to me, and I can't immediately see what might have gone wrong...

What error do you see when you run ghcup run --hls 2.2.0.0 --cabal 3.6.2.0 --stack 2.9.3 --install ?

fendor avatar Oct 04 '23 15:10 fendor