Hey all :clojure-lsp:, we had a bug that was introduced on 2021.01.26-22.35.27
regarding losing most of clj-kondo analysis, we recommend to update to latest clojure-lsp
to fix the bug
:calva: ♥️ :clojure-lsp:
Hey @pez @brandon.ringe suggest you bump :calva: that is using this version, sorry for that 😕
Thanks for the heads up!
No worries
I'm actually not seeing any issues in that version (was curious) - kondo analysis seems fine :thinking_face: . Maybe I don't know what I'm looking for though.
Going to update anyway
on clojure-lsp we have a batch analysis for external deps of 50, so if the classpath has 260 files, we will scan 6 times in batches of 50
the issue was that we were merging incorrectly the batch results, using only the last one
so for external deps it was missing most of deps, so hover, find defintiion and any feature regarding external deps were not working
TIL is not that easy deep merge a list of clojure maps 😛
Haha, I saw that change
Maybe I tested on too small of a project (few external deps, was just a test project) so it was working
New version of Calva out with latest 🎉
@ericdallo How close do you think the graalvm branch is to being done?
Main advantages of using graalvm: • Faster start times • ?
There is more details here :) https://dzone.com/articles/profiling-native-images-in-java
@ericdallo I've also mentioned this before: you should make trade-offs, a native image isn't always better than a JVM version. a JVM has JIT + higher throughput, so in a lot of cases for a long running server, the JVM wins
but it's still cool that you managed to do it
btw, this reflection config is way too big. I think everything clojure related you can leave out and is probably a false positive. https://github.com/clojure-lsp/clojure-lsp/blob/graalvm/graalvm/reflect-config.json
Yes, I intend to make a performance test to check if the tradeoff worth, anyway I learned a lot :p
I generally don't just take the generated config for granted, but just use it as a hint. E.g. the LSP classes you will probably need
Yes, it's on the todo clean those things, I was trying just to make it work for the start haha
Note that the bigger your reflection config, the larger your image becomes. Sure
Yes, I realized that, I'll use that tool to check what is inside the image too
I think the agent might think that every used clojure thing is needed because maybe the clojure compiler uses reflection during compilation
not sure about this, but could be
Yeah, it makes sense, I also removed the resource-config json that generated a lot of unnecessary things from clj-kondo sci/clj-kondo impl
@ericdallo Maybe you will get a better reflection list when invoking an already AOT-ed uberjar together with the graalvm agent 💡
Hum, I thout this was already happening since I used the uberjar task that has a :aot :all, how should I do that so?
java -jar uber.jar -agent-blabalbla
how did you run the agent?
That's how I tested with the agent, check the run-tracing-config.sh file on the pr
ah ok, then I don't know
the clojure compiler isn't involved anymore then, so that can't be it
maybe related to graal 21 too
neh, I've seen this before
Not sure, I think I fixed all issues regarding sqlite, log, JNI and @borkdude is giving a huge help, but I'm kind of stuck with lsp4j classes integration which uses a lot of reflection