haskell / haskell/vscode-haskell

HLS not starting if no HLS is installed in the system, even with "haskell.manageHLS": "GHCup" and ghcup installed

Offen
#869 8 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
597
Forks
98
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Your environment

Which OS do you use:

Debian stable

### Steps to reproduce
```
rm -r ~/.ghcup
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
```
In the installation I selected keep normal stack behaviour and I didn't install an hls. I assumed that haskell vscode would manage the installation of hls.

Open a stack haskell project, open a .hs file

### Expected behaviour

start hls

### Actual behaviour

hls doesn't start

### Include debug information

vscode user preferences has

```
"haskell.manageHLS": "GHCup",
```
vscode workspace preferences doesn't exist.

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](https://github.com/haskell/vscode-haskell#downloaded-binaries)):

Debug output:

```
$ LANG=C; haskell-language-server-wrapper --debug .
bash: haskell-language-server-wrapper: command not found
```

Paste the contents of extension specific log, you can check instructions about how to find it [here](https://github.com/haskell/vscode-haskell#troubleshooting)

Extension log:

```
2023-05-09 08:56:44.6390000 [client] INFO Finding haskell-language-server
2023-05-09 08:56:44.6510000 [client] INFO Checking for ghcup installation
2023-05-09 08:56:44.6570000 [client] INFO found ghcup at ghcup
2023-05-09 08:56:44.6580000 [client] INFO Executing 'ghcup --no-verbose upgrade' in cwd '/home/miguel/Development/Haskell/projects/SC/repos/essence-of-live-coding-gi-gtk'
2023-05-09 08:56:44.9610000 [client] INFO Checking for ghcup installation
2023-05-09 08:56:44.9680000 [client] INFO found ghcup at ghcup
2023-05-09 08:56:44.9690000 [client] INFO Executing 'ghcup --no-verbose list -t hls -c installed -r' in cwd '/home/miguel/Development/Haskell/projects/SC/repos/essence-of-live-coding-gi-gtk'
2023-05-09 08:56:45.0410000 [client] INFO Checking for ghcup installation
2023-05-09 08:56:45.0480000 [client] INFO found ghcup at ghcup
2023-05-09 08:56:45.0490000 [client] INFO Executing 'ghcup --no-verbose list -t hls -c available -r' in cwd '/home/miguel/Development/Haskell/projects/SC/repos/essence-of-live-coding-gi-gtk'
2023-05-09 08:56:45.1330000 [client] INFO Checking for ghcup installation
2023-05-09 08:56:45.1400000 [client] INFO found ghcup at ghcup
2023-05-09 08:56:45.1400000 [client] INFO Executing 'ghcup --no-verbose list -t cabal -c installed -r' in cwd '/home/miguel/Development/Haskell/projects/SC/repos/essence-of-live-coding-gi-gtk'
2023-05-09 08:56:45.2030000 [client] INFO Checking for ghcup installation
2023-05-09 08:56:45.2080000 [client] INFO found ghcup at ghcup
2023-05-09 08:56:45.2090000 [client] INFO Executing 'ghcup --no-verbose list -t stack -c installed -r' in cwd '/home/miguel/Development/Haskell/projects/SC/repos/essence-of-live-coding-gi-gtk'
2023-05-09 08:56:45.2710000 [client] INFO Checking for ghcup installation
2023-05-09 08:56:45.2750000 [client] INFO found ghcup at ghcup
2023-05-09 08:56:45.2760000 [client] INFO Executing 'ghcup --no-verbose whereis hls 1.10.0.0' in cwd '/home/miguel/Development/Haskell/projects/SC/repos/essence-of-live-coding-gi-gtk'
2023-05-09 08:56:45.2920000 [client] ERROR Error executing 'ghcup --no-verbose whereis hls 1.10.0.0' with error code 30
2023-05-09 08:56:45.2920000 [client] ERROR stderr: [ Error ] []8;;https://errors.haskell.org/messages/GHCup-00130\GHCup-00130]8;;\] The version 1.10.0.0 of the tool hls is not installed.

2023-05-09 08:56:45.2920000 [client] INFO Checking for ghcup installation
2023-05-09 08:56:45.2990000 [client] INFO found ghcup at ghcup
2023-05-09 08:56:45.2990000 [client] INFO Executing 'ghcup --no-verbose whereis cabal 3.6.2.0' in cwd '/home/miguel/Development/Haskell/projects/SC/repos/essence-of-live-coding-gi-gtk'
2023-05-09 08:56:45.3150000 [client] INFO Checking for ghcup installation
2023-05-09 08:56:45.3210000 [client] INFO found ghcup at ghcup
2023-05-09 08:56:45.3210000 [client] INFO Executing 'ghcup --no-verbose whereis stack 2.9.3' in cwd '/home/miguel/Development/Haskell/projects/SC/repos/essence-of-live-coding-gi-gtk'
2023-05-09 08:56:45.3430000 [client] INFO Executing 'ghc --numeric-version' in cwd '/home/miguel/Development/Haskell/projects/SC/repos/essence-of-live-coding-gi-gtk'
```

I believe the cause of this problem is that haskell vscode requires at least a version of HLS to be installed. After installing at least one hls the error goes away. But the readme almost says the opposite: "so if you want your HLS installations to be managed by the Extension, you will have to follow the [installation instructions for GHCup](https://www.haskell.org/ghcup/).". This does not say that an HLS has to be installed manually, or during the ghcup installation, and hints at the opposite, that haskell vscode will manage the installation of HLS. I suggest changing the readme to say that at least one hls must be installed when installing ghcup.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.