-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error trying to use vscode extension in windows 10 #3487
Comments
Hi, trying to debug the issue i've started adding log output to the estansion with unisonweb/vscode-unison#5
:-/ |
The ucm executable is listening on the ui port but no on the default lsp port:
|
@ChrisPenner @aryairani, as a heads up this seems to be happening for M4d and M4f users as well. I added some labels so it should show up for our next issue triage meeting. |
Ah, yeah, I remember now. unison/unison-cli/unison/Main.hs Lines 262 to 267 in 2e0ffc7
We disabled the LSP on Windows due to a bug in the GHC IO manager for windows that would cause UCM to fail to shut down properly if it was still listening on a port for connections, and unfortunately also made it impossible to kill the thread too. I think the plan was originally to try again once we got onto a new enough GHC version to use the new IO manager built specifically for windows; but IIRC I think I tried that at one point too and it had the same problem. All that said, there's probably some other way around this that I could figure out if I spent some more time on it; Maybe in the mean-time we make LSP on Windows "opt-in" by requiring that the At the very least I should update documentation to reflect the current situation on Windows. |
Thanks for the feedback, i navigated the code for a while and i did not find the comment 🤦 Is there some ticket about that ghc bug? It may help to reproduce it and to know if there is some workaround. The new ghc win io manager is not set by default in 9.2 iirc and not sure about its status in 9.4 but it is previsible it would suffer from bugs until its final stabilization.
💯 for this, a note in docs with a warning would be great imo |
@jneira I think it may be related to this note from https://gitlab.haskell.org/ghc/ghc/-/merge_requests/1224
But I'd need to look in a bit deeper to know for sure and unfortunately we're quite busy working on other aspects of Share at the moment. |
I have tested master enabling the lsp server for windows and it started to work fine, however even quiting from ucm shell makes it hangs and it needs a ctrl+c to return to system shell so not sure if it would be an option... |
Hrmm, yeah that's what I was experiencing too. The only other thing I can think that would be worth trying would be to compile on a version of GHC that supports the native IO manager on windows (I'm not positive which ones do, but I'd guess 9.2.5 probably does), and run that with And also try to determine whether it's the socket binding or the socket reading that's causing the hanging; then see about replacing that part with something non-blocking: unison/unison-cli/src/Unison/LSP.hs Line 55 in a885d68
If you happen to have a chance to look into it that'd be fantastic, though I completely understand if that's a bit too much work. |
Plan: document current limitations on Windows, and make it opt-in with a caveat. |
Could a flag be added, like |
Hi! I am trying to check the recent lsp support for unison in windows 10 and i am getting an alert in vscode:
My tools versions:
Extension config:
I dont see any log entry in the unison output pane ot the running ucm console
I've checked i can access the ucm ui in http://127.0.0.1:51060/3tUmMJ859ufqmqBy/ui
Thanks in advance (and thanks for unison)!
The text was updated successfully, but these errors were encountered: