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

Aperta
#869 8 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
48/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
haskell, typescript, vscode
Ambito
documentation

Direzione di ricerca

Inizia con le istruzioni di installazione di GHCup e HLS nel README, quindi confrontale con i comandi di riproduzione e il log dell'estensione in questa issue. Chiarisci se è necessaria un'installazione di HLS prima che l'estensione possa gestire HLS e aggiorna il README in modo che il prerequisito sia esplicito; il lavoro è completato quando la configurazione documentata corrisponde al comportamento osservato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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):

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

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.". 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.

Lingua principale
TypeScript
Stelle
594
Fork
99
Merge medio
18h 19m
PR unite (30g)
4

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di haskell/vscode-haskell

Tutte le issue di haskell/vscode-haskell

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.