Skip to content
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 publishing diagnostics #15

Closed
mhanberg opened this issue Jun 21, 2023 · 1 comment · Fixed by #21
Closed

error publishing diagnostics #15

mhanberg opened this issue Jun 21, 2023 · 1 comment · Fixed by #21
Assignees
Labels
bug Something isn't working

Comments

@mhanberg
Copy link
Collaborator

11:00:06.874 [error] LSP Exited.

Last message received: handle_info :publish

** (MatchError) no match of right hand side value: {:error, %{params: %{diagnostics: "expected a list of a %GenLSP.Structures.Diagnostic{}"}}}
    (gen_lsp 0.1.2) lib/gen_lsp.ex:305: GenLSP.dump!/2
    (gen_lsp 0.1.2) lib/gen_lsp.ex:209: GenLSP.notify/2
    (next_ls 0.1.1) lib/next_ls.ex:252: anonymous fn/3 in NextLS.handle_info/2
    (stdlib 4.3) maps.erl:411: :maps.fold_1/3
    (next_ls 0.1.1) lib/next_ls.ex:251: NextLS.handle_info/2
    (gen_lsp 0.1.2) lib/gen_lsp.ex:277: anonymous fn/4 in GenLSP.loop/3
    (gen_lsp 0.1.2) lib/gen_lsp.ex:289: GenLSP.attempt/2
    (stdlib 4.3) proc_lib.erl:240: :proc_lib.init_p_do_apply/3




11:00:06.876 [error] LSP Exited.

Last message received: handle_info {#Reference<0.2346312572.3890020356.4244>, [%Mix.Task.Compiler.Diagnostic{file: "<redacted>", severity: :warning, message: ["<redacted>", " is undefined (module ", "<redacted>", " is not available or is yet to be defined)"], position: 51, compiler_name: "Elixir", details: nil}, %Mix.Task.Compiler.Diagnostic{file: "<redacted>", severity: :warning, message: ["<redacted>", " is undefined (module ", "<redacted>", " is not available or is yet to be defined)"], position: 50, compiler_name: "Elixir", details: nil}, %Mix.Task.Compiler.Diagnostic{file: "<redacted>", severity: :warning, message: ["<redacted>", " is undefined (module ", "<redacted>", " is not available or is yet to be defined)"], position: 49, compiler_name: "Elixir", details: nil}]}

** (MatchError) no match of right hand side value: {:error, %{params: %{diagnostics: "expected a list of a %GenLSP.Structures.Diagnostic{}"}}}
    (gen_lsp 0.1.2) lib/gen_lsp.ex:305: GenLSP.dump!/2
    (gen_lsp 0.1.2) lib/gen_lsp.ex:209: GenLSP.notify/2
    (next_ls 0.1.1) lib/next_ls.ex:252: anonymous fn/3 in NextLS.handle_info/2
    (stdlib 4.3) maps.erl:411: :maps.fold_1/3
    (next_ls 0.1.1) lib/next_ls.ex:251: NextLS.handle_info/2
    (gen_lsp 0.1.2) lib/gen_lsp.ex:277: anonymous fn/4 in GenLSP.loop/3
    (gen_lsp 0.1.2) lib/gen_lsp.ex:289: GenLSP.attempt/2
    (stdlib 4.3) proc_lib.erl:240: :proc_lib.init_p_do_apply/3

Schematic should also output a better error than this.

@mhanberg
Copy link
Collaborator Author

also, this should probably do a GenLSP.error when a callback fails, rather than just logging., but i would have thought that the stderr would have been caught by neovim and printed int he lsp log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment