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

Abierto
#869 8 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
1/5
Tiempo estimado
Menos de una hora
Aptitud para principiantes
48/100
Tipo de issue
Documentación
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
haskell, typescript, vscode

Línea de trabajo

Comienza con las instrucciones de instalación de GHCup y HLS del README y compáralas después con los comandos de reproducción y el registro de la extensión de este issue. Aclara si es necesario instalar HLS antes de que la extensión pueda gestionar HLS y actualiza el README para que el prerrequisito quede explícito; se da por terminado cuando la configuración documentada coincide con el comportamiento observado.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
594
Forks
99
Merge medio
18 h 19 min
PR fusionados (30 d)
4

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de haskell/vscode-haskell

Todos los issues de haskell/vscode-haskell

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.