-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
credo-language-server fails to start #67
Comments
Can you try it with normal vscode? It looks like you are using the insiders build also, how long does running |
Also what version of OTP? |
Also is that all of the output? You said it finished compiling your project, did it ever emit any output about the runtime starting? |
I will try this shortly.
________________________________________________________
Executed in 2.87 secs fish external
usr time 16.25 secs 0.25 millis 16.25 secs
sys time 1.59 secs 1.88 millis 1.59 secs
24.3.4.8
That is all that output I see from the credo output in VSCode.
Not that I noticed. If it was output somewhere else, I may have missed it. |
Same exact issue in VSCode 1.79.2 |
I installed those elixir and otp versions and got
Probably related to #66 |
can you try running |
After doing that, and watching the [Credo] LSP Initialized!
[Credo] Booting runtime...
... (compile stuff) ... Then that output was cleared and the errors listed in my initial post occurred again. |
I tried clearing out |
okay, umbrella project? does your project use any custom checks? any credo plugins or 3rd party checks? what version of credo? |
also, it would help if you could share the full output. |
Negative
%{
configs: [
%{
name: "default",
files: %{
included: ["lib/", "test/", "config/"],
excluded: []
},
checks: [
{Credo.Check.Refactor.Nesting, max_nesting: 3},
{Credo.Check.Refactor.Apply, false},
{Credo.Check.Refactor.MapInto, false},
{Credo.Check.Warning.LazyLogging, false},
{Credo.Check.Design.TagTODO, exit_status: 0}
]
}
]
}
1.6.4 |
Which full output are you referring to? The initial LSP initialization bit, or...? If it's the former, I'm not sure what the best way to capture that is, as those logs are cleared immediately as I begin to receive the |
Are you saying that the scrollback doesn't go far enough? hmm |
Can you try making the following change to your credo config? normally the default config has these exclude patterns in them. %{
configs: [
%{
name: "default",
files: %{
included: ["lib/", "test/", "config/"],
- excluded: []
+ excluded: [~r"/_build/", ~r"/deps/"]
},
checks: [
{Credo.Check.Refactor.Nesting, max_nesting: 3},
{Credo.Check.Refactor.Apply, false},
{Credo.Check.Refactor.MapInto, false},
{Credo.Check.Warning.LazyLogging, false},
{Credo.Check.Design.TagTODO, exit_status: 0}
]
}
]
} |
Okay, i was able to reproduce the problem by copying your credo config into a project and using the same credo, elixir, and otp versions. I will test later tonight to get an exact reason. Thanks for your patience! |
And i saw the output log clear itself as well, I understand what you meant now. |
Thanks @mhanberg. Appreciate your work on these tools. |
I just gave this a try, and had a successful start. So that does seem to be our issue here. |
Hi, my apologies for commenting on a closed issue! And thank you for all of your work on this project! I'm having the same issue that @barkerja was having but the solution that worked for him does not appear to work for me.
I'll try to list out all applicable versions:
I've tried blowing away Also, I may very well be mistaken but it doesn't seem like using the Mix.install([:credo])
defmodule Test do
def run do
not_excluded_config = %Credo.Execution{
cli_options: %Credo.CLI.Options{path: "."},
files: %{
included: ["lib/", "test/", "config/"],
excluded: []
}
}
excluded_config = %Credo.Execution{
cli_options: %Credo.CLI.Options{path: "."},
files: %{
included: ["lib/", "test/", "config/"],
excluded: [
~r"/_build/",
~r"/deps/"
]
}
}
excluded_count = excluded_config |> Credo.Sources.find() |> Enum.count()
not_excluded_count = not_excluded_config |> Credo.Sources.find() |> Enum.count()
IO.puts("excluded count: #{excluded_count}\nnot excluded count: #{not_excluded_count}")
end
end
Test.run() This yields the same result for me. |
Can you make sure you are running credo-language-server 0.2.0? It should print what version it is in the output panel before you see the timeout errors. It should auto update if you restart vscode, but I want to make sure. |
Hmm ... Maybe I wasn't because now it's working. and I do see the Is the language server doing something different than what credo does, out-of-the-box? It doesn't make sense to me that the |
That was just a hypothesis. The fix that I found last night was a timeout. Credo took longer than the configured timeout so I set it to infinity. Unrelated to the config thing. |
Gotchya! Okay. So you'd expect this to work with 0.2.0 without the changes to exclude I am still getting a timeout error if I don't include that change. |
I just installed v0.2.2. Watching the output for Credo, after my application fully compiles, I see the following error:
The connection to server is erroring. error continues to repeat indefinitely.
Environment:
Elixir 1.14.2 (compiled with Erlang/OTP 24)
If there is more info I can provide, please let me know how to do so! 🙏🏻
The text was updated successfully, but these errors were encountered: