This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-06-23
Channels
- # announcements (1)
- # asami (2)
- # aws (15)
- # babashka (4)
- # beginners (42)
- # calva (8)
- # clj-kondo (7)
- # cljsrn (31)
- # clojure (64)
- # clojure-australia (4)
- # clojure-europe (40)
- # clojure-italy (2)
- # clojure-nl (5)
- # clojure-uk (10)
- # clojured (1)
- # clojurescript (16)
- # conjure (4)
- # datomic (5)
- # defnpodcast (2)
- # events (1)
- # fulcro (61)
- # graphql (11)
- # honeysql (9)
- # jobs (3)
- # jobs-discuss (3)
- # lsp (65)
- # malli (3)
- # meander (4)
- # off-topic (5)
- # pathom (32)
- # podcasts-discuss (2)
- # polylith (2)
- # re-frame (30)
- # reitit (6)
- # remote-jobs (3)
- # ring (4)
- # shadow-cljs (19)
- # sql (28)
- # vim (1)
- # xtdb (21)
getting an error when I startup clojure-lsp (looks like a graalvm error, reflection stuff)
Jun 23, 2021 1:38:49 PM org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer fireError
SEVERE: Unable to invoke no-args constructor for class org.eclipse.lsp4j.CodeLensWorkspaceCapabilities. Registering an InstanceCreator with Gson for this type may fix this problem.
java.lang.RuntimeException: Unable to invoke no-args constructor for class org.eclipse.lsp4j.CodeLensWorkspaceCapabilities. Registering an InstanceCreator with Gson for this type may fix this problem.
at com.google.gson.internal.ConstructorConstructor$14.construct(ConstructorConstructor.java:228)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:212)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222)
at com.google.gson.Gson.fromJson(Gson.java:932)
at org.eclipse.lsp4j.adapters.InitializeParamsTypeAdapter.readCapabilities(InitializeParamsTypeAdapter.java:151)
at org.eclipse.lsp4j.adapters.InitializeParamsTypeAdapter.read(InitializeParamsTypeAdapter.java:109)
at org.eclipse.lsp4j.adapters.InitializeParamsTypeAdapter.read(InitializeParamsTypeAdapter.java:34)
at com.google.gson.TypeAdapter$1.read(TypeAdapter.java:199)
at com.google.gson.Gson.fromJson(Gson.java:932)
at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.fromJson(MessageTypeAdapter.java:329)
at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.parseParams(MessageTypeAdapter.java:249)
at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.read(MessageTypeAdapter.java:119)
at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.read(MessageTypeAdapter.java:55)
at com.google.gson.Gson.fromJson(Gson.java:932)
at org.eclipse.lsp4j.jsonrpc.json.MessageJsonHandler.parseMessage(MessageJsonHandler.java:119)
at org.eclipse.lsp4j.jsonrpc.json.MessageJsonHandler.parseMessage(MessageJsonHandler.java:114)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:193)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.lang.Thread.run(Thread.java:829)
at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:553)
at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Method.java:566)
at com.google.gson.internal.UnsafeAllocator$1.newInstance(UnsafeAllocator.java:50)
at com.google.gson.internal.ConstructorConstructor$14.construct(ConstructorConstructor.java:225)
... 28 more
Caused by: java.lang.IllegalArgumentException: Class org.eclipse.lsp4j.CodeLensWorkspaceCapabilities is instantiated reflectively but was never registered. Register the class by using org.graalvm.nativeimage.hosted.RuntimeReflection
at com.oracle.svm.core.graal.snippets.SubstrateAllocationSnippets.hubErrorStub(SubstrateAllocationSnippets.java:261)
at sun.misc.Unsafe.allocateInstance(Unsafe.java:840)
... 31 more
I didn't catch that because it seems lsp-mode (emacs) doesn't send that for some reason
I just jumped to nvim 0.5.0 and I was investigating if this was related, thanks I didn't spent much time before searching here 😁
Yeah, I made sure this doesn't happen only for vim anymore fixing it on emacs as well, also I'll release tomorrow morning the clojure-lsp fix @UMMMKKADU
Oh I will wait then, I was looking to install graalvm in my machine right now to get the patched bin
I just thought that would be cool to have a nightly release in some sort like https://github.com/neovim/neovim/releases/tag/nightly
Usually we don't have quick fixes like this and we already release pretty fast, but it's a idea indeed
@UMMMKKADU Actually, I'll release it right now as my lsp-mode fix will bring more issues like this until tomorrow
Still getting an error, is quite similar to the one dharrigan posted, but is for a different class:
org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer fireError
SEVERE: Unable to invoke no-args constructor for class org.eclipse.lsp4j.LinkedEditingRangeCapabilities. Registering an InstanceCreator with Gson for this type may fix this problem.
java.lang.RuntimeException: Unable to invoke no-args constructor for class org.eclipse.lsp4j.LinkedEditingRangeCapabilities. Registering an InstanceCreator with Gson for this type may fix this problem.
at com.google.gson.internal.ConstructorConstructor$14.construct(ConstructorConstructor.java:228)
My versions:
clojure-lsp 2021.06.24-01.20.01
clj-kondo 2021.06.18
Yeah I will make the setup in my machine, you use arch linux right, do I need https://aur.archlinux.org/packages/native-image-jdk11-bin/ and there is any other deps?
You'll need to build the classes first, i.e., clj -X:javac
then ./graalvm/native-unix-compile.sh
woah haha, I did the make prod-bin
with java-11-openjdk
I'm running make prod-native
now
It compiled fine, but I'm quite dumb and I compiled the master branch of your fork :kill-me:
compiling bugfix/issue-451
now
Yeap can confirm @U11EL3P9U's branch is working fine for me
Is there a way to get source-paths
in clojure-lsp
? whether it has been defined in .lsp/config
or anywhere else(if that’s possible?) ?
Yeah, but it prints it to the clojure-lsp output channel. We’ve talked about this before. 😃 (And I still haven’t checked it up closer, hoping that @U9A1RLFNV will just tell me where to look, haha.)
Oh, got it, it's the same issue we talked indeed, I thought @U01PG2LDYV8 was with issues on Calva, but it's seems a developer issue 😅