-
Notifications
You must be signed in to change notification settings - Fork 90
Cannot start language server on MacOS "Invalid Byte Sequence" #1009
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
Comments
Hi, thank you for your bug report! It seems like HLS is working correctly, and this looks like it is somehow a VSCode-haskell issue. I can't seem to reproduce on arch linux. |
I am not entirely sure whether this works on MacOs, but try running VSCode from the terminal with |
Yes! This worked! I executed the above command and the extension was notably doing "different" things. First noticable difference was that I got flashed with the notification whether I want to install Do you have any idea how I could persist this setting? |
I get an error from my diff script, though, which reports:
I presume that this is not an issue with your extension, however, it seems like launching vscode this way may have unintended side-effects. |
This hints to me that your Rather, figure out why the locale is wrong. Unfortunately, I don't have a Mac available right now, look in the settings whether everything's correct. Also, what is the output of |
In my standard zhs shell, I get:
In the vscode shell (when launching vscode as suggested by you above), I get:
In the vscode shell (when launching it normally), I get:
Sidenotes: A colleague of mine runs into the same problems on their Mac in the |
I worked out a slightly better fix. Setting the following setting @fendor Maybe this is worth documenting in the README? |
I'd be happy to merge updates to the documentation :) |
Done! |
Your environment
Which OS do you use: MacOS
Steps to reproduce
lib
Expected behaviour
The language server should start
Actual behaviour
The language server does not start, but crashes five times with this specific error message:
Weirdly enough, I cannot reproduce this in my shell. If I execute
haskell-language-server-wrapper --project-ghc-version
inzsh
, it outputs:Maybe this is an encoding issue? I cannot find how I could set the encoding used in the shell that is launched by the extension. According to vscode, the cabal file in
accountability
is UTF-8 encoded. I do not think that this issue is specific to that cabal file, though. Probably,accountability
just gets loaded first (starts with "a").Include debug information
Debug output:
Attached as: debug.txt
Extension log:
The text was updated successfully, but these errors were encountered: