Ok, so the type hinting fixed that case, but It being really hard to make lsp4j work correctly, it looks it uses a lot of reflection and I'm not sure I'm on the right path... The https://github.com/clojure-lsp/clojure-lsp/pull/267/files#diff-736ec9c37d3ba754db0a1f0c6cc5df40e8f284fb11e4824e55920cce814c37d8R1 already looks huge and I started to think that adding some classes have caused inconsistency like request params objects come with some fields null and etc. Also I could not run the java from graalvm to check what should looks like my reflection.json since is not available for my NixOS 😕
@ericdallo If you add this to your project.clj
, you might get all the reflection warnings with lein
before even trying GraalVM:
:global-vars {*warn-on-reflection* true
*assert* true
*unchecked-math* :warn-on-boxed}
this won't help for java code which uses reflection
1✔️for this you can use the graalvm agent
Yep, that's the agent that should be used with graal's java that is not available for NixOs :/
you can just download graalvm to a Downloads directory. there is no need to "install". Or aren't you allowed to downloading anything in nixOS?
I can if it don't use any other lib
I will give a try so
yes, it's standalone. just unzip it and set GRAALVM_HOME
to the thing and then use $GRAALVM_HOME/native-image
this is how I use multiple graalvm versions side by side
also run $GRAALVM_HOME/gu install native-image
$GRAALVM_HOME/bin/gu install native-image
to be precisethanks!
but to run with graal's java it should be something like $GRAALVM_HOME/bin/java
I guess
that's right. you can export GRAALVM_HOME on the path like export PATH="$GRAALVM_HOME/bin:$PATH"
and then just run java
It doesn't work, it depends on libs from SO 😕
This is what I install on CircleCI:
sudo apt-get -y install gcc g++ zlib1g-dev
I'm sure there is a nixOS incantation for this?
you can always run this in a docker I guess
I tried the docker before, but failed for some reason, I gave a try again and it worked run the java from graal with the agent on NixOS via docker:tada:
I got a huge relfect json config generated with a lot of classes from clojure and some with dynamic names (using the object reference Id)
Yeah, there is a lot of stuff in there that you don't need. I'm not sure why it's showing up. Maybe it helps if you run with direct linking.
1👍-J-Dclojure.compiler.direct-linking=true
I'm afk now
1👋