elixir-tools / credo-language-server

LSP implementation for Credo.
MIT License
96 stars 11 forks source link

CoC.nvim (RuntimeError) no shell process input given for yes?/2 #66

Closed mhanberg closed 1 year ago

mhanberg commented 1 year ago
          πŸ‘‹πŸΌ @mhanberg After upgrading to `0.1.1` and forth, I'm not able to run the server using CoC again. Do I need to change anything in the custom LS configuration? Here's the error:
** (RuntimeError) no shell process input given for yes?/2
    (mix 1.14.5) lib/mix/shell/process.ex:148: Mix.Shell.Process.yes?/2
    (mix 1.14.5) lib/mix/tasks/deps.compile.ex:256: Mix.Tasks.Deps.Compile.handle_rebar_not_found/1
    (mix 1.14.5) lib/mix/tasks/deps.compile.ex:218: Mix.Tasks.Deps.Compile.do_rebar3/2
    (mix 1.14.5) lib/mix/tasks/deps.compile.ex:96: anonymous fn/4 in Mix.Tasks.Deps.Compile.compile/2
    (elixir 1.14.5) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    (mix 1.14.5) lib/mix/tasks/deps.compile.ex:80: Mix.Tasks.Deps.Compile.compile/2
    (mix 1.14.5) lib/mix/tasks/deps.loadpaths.ex:84: Mix.Tasks.Deps.Loadpaths.deps_check/2
    (mix 1.14.5) lib/mix/tasks/deps.loadpaths.ex:43: Mix.Tasks.Deps.Loadpaths.run/1
[Error - 07:48:22.845] ~/projects/elixir/credo-ls/bin/credo-language-server exited with code: 1
[Error - 07:48:22.845] Connection to server got closed. Server will not be restarted.
[Error - 07:48:22.845] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 

And this is the config working until 0.1.1:

    "credoLS": {
      "command": "~/projects/elixir/credo-ls/bin/credo-language-server",
      "args": [
        "--stdio"
      ],
      "filetypes": [
        "elixir",
        "eelixir",
        "heex"
      ],
      "rootPatterns": [
        "mix.exs"
      ],
    },

Originally posted by @bigardone in https://github.com/elixir-tools/credo-language-server/issues/7#issuecomment-1606696713

mhanberg commented 1 year ago

how do you have Elixir and Erlang installed?

newer versions start an erlang node to run your code in, and I'm wondering if it's using a different version of Elixir than you are meaning to, so rebar is not installed yet.

bigardone commented 1 year ago

I'm using asdf:

❯ asdf current
elixir          1.14.5-otp-25   /Users/user/projects/project/.tool-versions
erlang          25.3.2.2        /Users/user/projects/project/.tool-versions
mhanberg commented 1 year ago

what happens if you delete the .elixir-tools/_build directory and restart?

I'm very confused at this, so just want to make sure something didn't get goofed up during an update.

mhanberg commented 1 year ago

@bigardone https://github.com/elixir-tools/credo-language-server/issues/67

Can you try the suggestion in that comment and let me know if it fixes it?

bigardone commented 1 year ago

@mhanberg I already had the same configuration. However, I have upgraded to 0.2.0, and everything is working like a charm again πŸŽ‰

Thank you so much πŸ™ŒπŸΌ