lsp

pez 2025-05-19T10:40:03.631349Z

nightly fails to start in some of my projects, latest works fine. Anyone else seeing this?

[Error - 12:36:18 PM] Server initialization failed.
  Message: Internal error
  Code: -32603 
[object Object]
[Error - 12:36:18 PM] Clojure Language Client client: couldn't create connection to server.
  Message: Internal error
  Code: -32603 
[object Object]

ericdallo 2025-05-19T12:09:10.242869Z

Working for me (linux-amd64)

pez 2025-05-19T13:51:20.933899Z

I think the key word in my observation is “fails to start in some of my projects”. 😃 So for some of my projects it works and for others it doesn’t. I haven’t figured out a pattern.

ericdallo 2025-05-19T13:54:07.645329Z

Hum, interesting, it may be some change in master so

ericdallo 2025-05-19T13:54:24.334549Z

If you manage to repro in some public repo LMK

pez 2025-05-19T14:04:27.217189Z

I see this trace in the lsp log:

2025-05-19T14:01:38.989Z  ERROR [clojure-lsp.server:60] - Error receiving message: Internal error (-32603)
{:id 0, :method "initialize"}
   com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine     PlatformThreads.java:  872
   com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine     PlatformThreads.java:  896
                                            java.lang.Thread.run              Thread.java: 1583
                                        java.lang.Thread.runWith              Thread.java: 1596
              java.util.concurrent.ThreadPoolExecutor$Worker.run  ThreadPoolExecutor.java:  642
               java.util.concurrent.ThreadPoolExecutor.runWorker  ThreadPoolExecutor.java: 1144
                             java.util.concurrent.FutureTask.run          FutureTask.java:  317
                                                             ...                              
                             clojure.core/binding-conveyor-fn/fn                 core.clj: 2047
       clojure-lsp.feature.diagnostics.built-in/analyze-uris!/fn             built_in.clj:  224
   clojure-lsp.feature.diagnostics.built-in/find-ignore-comments             built_in.clj:   38
                                            clojure.core/filterv                 core.clj: 7068
                                             clojure.core/reduce                 core.clj: 6964
                                                             ...                              
                                         clojure.core/filterv/fn                 core.clj: 7074
clojure-lsp.feature.diagnostics.built-in/find-ignore-comments/fn             built_in.clj:   38
                                            clojure.core/re-find                 core.clj: 4951
                                         clojure.core/re-matcher                 core.clj: 4909
                                 java.util.regex.Pattern.matcher             Pattern.java: 1180
                                  java.util.regex.Matcher.<init>             Matcher.java:  256
                                   java.util.regex.Matcher.reset             Matcher.java:  461
                           java.util.regex.Matcher.getTextLength             Matcher.java: 1808
         java.lang.NullPointerException:
java.util.concurrent.ExecutionException: java.lang.NullPointerException
So something with ignore comments?

ericdallo 2025-05-19T14:04:40.319199Z

it's indeed related to some changes I did

ericdallo 2025-05-19T14:04:50.189329Z

any public repro I can try?

ericdallo 2025-05-19T14:05:02.458439Z

glad you found this before a release hehe

☂️ 1
pez 2025-05-19T14:07:07.662209Z

I’ll see if I can find a public repo that repros it.

👍 1
ericdallo 2025-05-19T14:09:29.639749Z

also if you could check clojure-lsp logs, there will have more info, maybe something before the exception

pez 2025-05-19T14:21:46.006229Z

This is probably not minimal. But it repros the problem:

(ns foo.bar)

#_#_#_#_1 2 3 4 5

(defn foo []
  (str #_#_#_#_"" '() "" '()))

#_{:clj-kondo/ignore [:clojure-lsp/unused-public-var]}
(def bar 1)

ericdallo 2025-05-19T14:22:05.788739Z

thanks, will take a look

ericdallo 2025-05-19T15:08:16.237829Z

@pez did a push fixing that case, a nightly should be available soon, LMK if any others please

🙏 1