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

No case clause for "attribute" with VSCode 1.82.3 #280

Closed
fhunleth opened this issue Oct 8, 2023 · 1 comment · Fixed by #281
Closed

No case clause for "attribute" with VSCode 1.82.3 #280

fhunleth opened this issue Oct 8, 2023 · 1 comment · Fixed by #281

Comments

@fhunleth
Copy link
Contributor

fhunleth commented Oct 8, 2023

I'm not quite sure how to reproduce this, but it just started recently. Everything works fine with VSCode and then at some point I get the following error repeatedly and VSCode stops letting me save the file that I'm working on.

** (CaseClauseError) no case clause matching: "attribute"
    (next_ls 0.13.4) lib/next_ls.ex:337: NextLS.handle_request/2
    (gen_lsp 0.6.0) lib/gen_lsp.ex:248: anonymous fn/5 in GenLSP.loop/3
    (gen_lsp 0.6.0) lib/gen_lsp.ex:308: GenLSP.attempt/3
    (stdlib 5.0.2) proc_lib.erl:241: :proc_lib.init_p_do_apply/3

It seems like one easy fix would be to ignore unknown reference types. I didn't know whether that was a bad idea so I figured that I'd post the issue.

@mhanberg
Copy link
Collaborator

mhanberg commented Oct 8, 2023

Yes, it should just return nil in that case.

mhanberg pushed a commit that referenced this issue Oct 16, 2023
This fixes the following exception that I started getting with VSCode
1.82.3:

```
** (CaseClauseError) no case clause matching: "attribute"
    (next_ls 0.13.4) lib/next_ls.ex:337: NextLS.handle_request/2
    (gen_lsp 0.6.0) lib/gen_lsp.ex:248: anonymous fn/5 in GenLSP.loop/3
    (gen_lsp 0.6.0) lib/gen_lsp.ex:308: GenLSP.attempt/3
    (stdlib 5.0.2) proc_lib.erl:241: :proc_lib.init_p_do_apply/3
```

Fixes #280.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants