vscode-haskell
vscode-haskell copied to clipboard
Using extension in docker devcontainer got stuck downloading haskell language server
I am connecting to a haskell docker image but get a message "Downloading haskell-language-server-wrapper". I initially thought it was downloadin but after 24 hours realized something not right.
any ideas? I am able to runhaskell in the terminal
WIndows 10 VSCode 1.62.2
with or without devcontainer.json in my project directory
{ "name" : "haskell", "images" : "haskell", "extensions" : "haskell.haskell" }
have you check if you docker container is able to download the prebuilt binary outside the extension, f.e. using curl https://github.com/haskell/haskell-language-server/releases/download/1.4.0/haskell-language-server-wrapper-Linux.gz?
actually no... hmm
I get a "you are being redirected"
other extensions install fine ...
actually no... hmm
I get a "you are being redirected"
hmm i see, use curl -L https://github.com/haskell/haskell-language-server/releases/download/1.4.0/haskell-language-server-wrapper-Linux.gz
other extensions install fine ...
do you know if any of they are doing http calls as part of the setup process?
other extensions install fine ...
do you know if any of they are doing http calls as part of the setup process?
not sure but have the following;
- Haskell Syntax Highlighting
- Code Runner v0.11.6
by the way tried on haskell:9.0.1 and haskell:8.10 with same issue
actually no... hmm I get a "you are being redirected"
hmm i see, use
curl -L https://github.com/haskell/haskell-language-server/releases/download/1.4.0/haskell-language-server-wrapper-Linux.gz
tried curl -L but for Windows, correct?
curl -L https://github.com/haskell/haskell-language-server/releases/download/1.4.0/haskell-language-server-wrapper-Windows.exe.zip
curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.haxx.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
not sure why but getting this now...
curl -L https://github.com/haskell/haskell-language-server/releases/download/1.4.0/haskell-language-server-wrapper-Windows.exe.zip
Warning: Binary output can mess up your terminal. Use "--output -" to tell Warning: curl to output it to your terminal anyway, or consider "--output Warning: <FILE>" to save to a file.
tried curl -L but for Windows, correct?
Ii assumed you were running linux inside the docker image, does not images: haskell refers to https://github.com/microsoft/vscode-dev-containers/tree/main/containers/haskell? that one is running linux
not sure why but getting this now...
If you get that warning is it has reached the url. So the extension should be able to download it. Could collect the logs as described here: https://github.com/haskell/vscode-haskell#investigating-and-reporting-problems and post them?
results of logs...
[client][INFO] Searching for server executables haskell-language-server-wrapper,haskell-language-server in $PATH [client][INFO] Downloading haskell-language-server [client][INFO] Fetching the latest release from GitHub or from cache [client][INFO] The latest release is 1.4.0 [client][INFO] Figure out the ghc version to use or advertise an installation link for missing components [client][INFO] Working out the project GHC version. This might take a while...
Hmm it should take a while but terminate 😄
I dont have a devcontainer setup at hand to try to reproduce, sorry. However i would try to have the project prebuilt through the shell (with cabal or stack) before opening it in vscode. Trying to build it may help to discover the cause of the hang (as the extension has to trigger a build to get the ghc version of the project)
tried on linux with no issue. I am closing as I suspect something funny on my work laptop.
tried on linux with no issue. I am closing as I suspect something funny on my work laptop.
Nice! Happy to see the devcontainer setup works, at least in some envs. Will try to setup a devcontainer env in my windows laptop to check it works.
@jneira I am attaching to the haskell container but as root. How do I do so as non-root?
@jneira I am attaching to the haskell container but as root. How do I do so as non-root?
sorry cant help much with devcontainers until i get an env to try it, maybe @k3yzerS0ze will know how?
after installing ghc 8.10.7 using choco on my local Windows 10 I am getting the similar issue as the docker...
i get the following msg: Downloading haskell-language-server 1.5.0 for GHC 8.10.7 nothing downloads
never mind ... rebooted and all working as expected.
hmm just i tried in my windows machine and it worked :sweat_smile:
so this still leaves us with the docker image issue... I initially suspected something funny on my work laptop that prevented me from downloading (firewalls etc) ... Hmm
going to leave open until someone proof otherwise.