Shopify / vscode-as

VSCode Language Client for AssemblyScript
MIT License
16 stars 6 forks source link

Language server crashes with locale error #49

Open dsyer opened 2 years ago

dsyer commented 2 years ago

In an attempt to fix #42 (#47) I updated the asls to the latest release, followed the instructions in the README and repackaged the extension as v0.4.1, finally installing the vsix locally. Then it fails in a different way:

AssemblyScript Language Server not started. The server returned: warning: the VM is running with native name encoding of latin1 which may cause Elixir to malfunction as it expects utf8. Please ensure your locale is set to UTF-8 (which can be verified by running "locale" in your shell)

I'm sure why that is happening, or where to start fixing it. I can't see "latin1" anywhere in the environment.

I force LC_ALL=en_US.UTF-8 in the environment, and there's a new error:


  AssemblyScript Language Server not started.
  The server returned:

  ** (UndefinedFunctionError) function AssemblyScriptLS.CLI.start_with_options/1 is undefined or private
    AssemblyScriptLS.CLI.start_with_options([port: 0])
    (stdlib 3.14.2) erl_eval.erl:680: :erl_eval.do_apply/6
    (elixir 1.11.4) lib/code.ex:341: Code.eval_string_with_error_handling/3

I don't know where to even start with that one.

StealthyCoder commented 2 years ago

I might have a fix. At least these are the steps I took in order to get a working situation for myself.

For some reason the other code will not load the Module for whatever reason. I am really not sure what the magic combination is because Erlang/Elixir is not my forte.

Hope this helps others out.