Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VScode doesn't recognize HLS installation #968

Open
Momentum93 opened this issue Sep 27, 2023 · 4 comments
Open

VScode doesn't recognize HLS installation #968

Momentum93 opened this issue Sep 27, 2023 · 4 comments

Comments

@Momentum93
Copy link

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.


@openingnow
Copy link

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

@fendor
Copy link
Collaborator

fendor commented Oct 4, 2023

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 fendor changed the title VScode doesn't recognize HSL installation VScode doesn't recognize HLS installation Oct 29, 2023
@ethantruelove
Copy link

Setting HLS as active is not necessary for the VSCode extension to work properly.

I'm currently having an issue where the VSCode extension works only on projects where the active HLS is correct for that project.

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 ?

I'm on slightly newer versions, but nothing happens other than returning the path to the tmp directory:
/Users/ethan/.ghcup/tmp/ghcup-cabal-3.10.3.0_hls-2.9.0.1_stack-3.1.1

@fendor
Copy link
Collaborator

fendor commented Oct 24, 2024

Hi, thanks for reaching out!

Without further details, I am not convinced your issue is the same as described in this issue. Could you open a new issue with more details, e.g. logs of the extension which can be obtained by following https://github.com/haskell/vscode-haskell?tab=readme-ov-file#investigating-and-reporting-problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants