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

reader comments in let blocks break codeActions #1227

Closed
Cyrik opened this issue Sep 2, 2022 · 1 comment · Fixed by #1228
Closed

reader comments in let blocks break codeActions #1227

Cyrik opened this issue Sep 2, 2022 · 1 comment · Fixed by #1228
Labels
bug Something isn't working editor Related to clojure-lsp on a text editor
Projects

Comments

@Cyrik
Copy link
Contributor

Cyrik commented Sep 2, 2022

Describe the bug
When a let expression only contains "reader commented" expressions it throws an exception.

To Reproduce
In Calva click on (let [#_new-project-settings #_(config/resolve-for-root project-root-uri)]). textDocument/codeAction failed will be shown.

Expected behavior
No explosion.

Log - client <-> server
{
    "textDocument": {
        "uri": "file:///Users/lukas/Workspace/scarlet/q/src/q/settings.clj"
    },
    "range": {
        "start": {
            "line": 67,
            "character": 24
        },
        "end": {
            "line": 67,
            "character": 24
        }
    },
    "context": {
        "diagnostics": [],
        "triggerKind": 2
    }
}
Log - clojure-lsp
{
    "id": 643,
    "method": "textDocument/codeAction"
}

User details (please complete the following information):

  • OS: macOS
  • Editor Calva
  • Version: 2022.09.01-15.27.31

Additional context
Error in the log:

2022-09-02T22:19:56.723Z  ERROR [clojure-lsp.server:39] - Error receiving message: Internal error (-32603)
{:id 643, :method "textDocument/codeAction"}
�[37mcom.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine�[m  �[32mPosixPlatformThreads.java:  202�[m
            �[37mcom.oracle.svm.core.thread.PlatformThreads.threadStartRoutine�[m  �[32m     PlatformThreads.java:  705�[m
                                                     �[37mjava.lang.Thread.run�[m  �[32m              Thread.java:  829�[m
                       �[37mjava.util.concurrent.ThreadPoolExecutor$Worker.run�[m  �[32m  ThreadPoolExecutor.java:  628�[m
                        �[37mjava.util.concurrent.ThreadPoolExecutor.runWorker�[m  �[32m  ThreadPoolExecutor.java: 1128�[m
                                      �[37mjava.util.concurrent.FutureTask.run�[m  �[32m          FutureTask.java:  264�[m
                                                                      �[37m...�[m  �[32m                               �[m
                                      �[33mclojure.core/binding-conveyor-fn/�[1;33mfn�[m  �[32m                 core.clj: 2047�[m
                                  �[33mclojure-lsp.feature.code-actions/all/�[1;33mfn�[m  �[32m         code_actions.clj:  329�[m
                              �[33mclojure-lsp.feature.drag/�[1;33mcan-drag-backward?�[m  �[32m                 drag.clj:  493�[m
                                       �[33mclojure-lsp.feature.drag/�[1;33mcan-drag?�[m  �[32m                 drag.clj:  492�[m
                                            �[33mclojure-lsp.feature.drag/�[1;33mplan�[m  �[32m                 drag.clj:  483�[m
                                     �[33mclojure-lsp.feature.drag/�[1;33mtarget-locs�[m  �[32m                 drag.clj:  476�[m
                                                     �[33mrewrite-clj.zip/�[1;33mnode�[m  �[32m                 zip.cljc:  178�[m
                                      �[33mrewrite-clj.custom-zipper.core/�[1;33mnode�[m  �[32m                core.cljc:   55�[m
                                                         �[33mclojure.zip/�[1;33mnode�[m  �[32m                  zip.clj:   67�[m
         �[1;31mjava.lang.NullPointerException�[m: �[3m�[m
�[1;31mjava.util.concurrent.ExecutionException�[m: �[3mjava.lang.NullPointerException�[m
@Cyrik Cyrik added bug Something isn't working editor Related to clojure-lsp on a text editor labels Sep 2, 2022
@ericdallo
Copy link
Member

Good catch! it's related to the drag feature and should not be hard to fix, will you take a look @mainej ?

@ericdallo ericdallo added this to Low priority in clojure-lsp via automation Sep 3, 2022
@ericdallo ericdallo moved this from Low priority to High priority (Probably next release) in clojure-lsp Sep 3, 2022
clojure-lsp automation moved this from High priority (Probably next release) to Next release Sep 4, 2022
@ericdallo ericdallo moved this from Next release to Done in clojure-lsp Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working editor Related to clojure-lsp on a text editor
Projects
Development

Successfully merging a pull request may close this issue.

2 participants