-
-
Notifications
You must be signed in to change notification settings - Fork 390
No working feature using vscode and hls in wsl2, nix and devcontainer #2213
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Posting the issue as i dont have any clue where the problem could come from. The server log does not seem to be erroneous but it seems it is ignoring messages from the client other than close, open and edit the file (and the lsp configuration). Regular log from plugin activity is not shown. |
@jneira thank you for opening an issue. I have created a minimum repro repository: https://github.com/Rizary/haskell-devcontainer. I've tried it in my WSL2, Windows 10 (using haskell-language-server devcontainer from microsoft repo), and in my Ubuntu 20.04 Hyper-V machine without any positive result. Is it because of my VSCode's user setting? But I doubt it. |
Did you have the chance to try in native windows, to compare the behaviour? |
Yes, I did. It is working fine in native windows. Here is the log that I got from windows:
One thing that I notice is hie-bios is not loaded and running. It also still detect hls version 1.2.0.0 while I already have 1.4.0.0. Edit: fix the log format. |
I have update my repo with just ubuntu (with hvr's ppa for cabal and ghc installation) and it still won't work. Here is the log:
Edit: fix the log format. |
@jneira I think I'm done for now with devcontainer + haskell language server. It seems the problem reside somewhere inside the invocation of hie-bios, or the hls itself didn't know how to run inside vscode devcontainer. |
have you try the official devcontainer image? https://github.com/microsoft/vscode-dev-containers/tree/main/containers/haskell |
@jneira I did and it doesn't work either. One thing that I notices are (but need clarification):
Which is about normalizing uri. Turns out all has minus value. I've tried to read the source code, but I got lost. What I understand is
In my understanding, the path doesn't get normalized. If it is, then it should be
2021-09-20 13:10:40.5214636 [ThreadId 71] INFO hls: Consulting the cradle for "backend\\app\\Main.hs"
Output from setting up the cradle Cradle {cradleRootDir = "D:\\Engineer\\ubuntu2004\\rizary\\rizary-haskell", cradleOptsProg = CradleAction: Cabal}
2021-09-20 13:10:45.6334905 [ThreadId 80] INFO hie-bios: Resolving dependencies...
2021-09-20 13:10:45.9464895 [ThreadId 80] INFO hie-bios: Build profile: -w ghc-9.0.1 -O1
2021-09-20 13:10:45.9464895 [ThreadId 80] INFO hie-bios: In order, the following will be built (use -v for more details):
2021-09-20 13:10:45.9464895 [ThreadId 80] INFO hie-bios: - backend-0.1.0.0 (exe:backend) (first run)
2021-09-20 13:10:47.3255143 [ThreadId 80] INFO hie-bios: Preprocessing executable 'backend' for backend-0.1.0.0.. |
yeah, just that, the code is in the library lsp:
When you say "There is no..", do you mean you see those entries in the log when using native windows but no when you use devcontainer?
But i think you got the possible root cause, the workspace folder uri is not well handled and it seems hls thinks there is no haskell source code. |
Does hashing into negative value matter?
correct.
The above is the working one. In devcontainer, there is no such thing.
Yeah, but they somehow got the |
No, it is fine
Hmm, you are right, unfortunately i have not used devcontainers so i cant confirm if they even work, will try to check it |
There is an issue with a similiar setup in the extension repo: haskell/vscode-haskell#501 |
The text was updated successfully, but these errors were encountered: