lsp

:clojure-lsp: Clojure implementation of the Language Server Protocol: https://clojure-lsp.io/
ericdallo 2021-01-28T03:09:24.128900Z

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

pez 2021-01-28T08:39:33.131700Z

:calva: ♥️ :clojure-lsp:

ericdallo 2021-01-28T03:10:23.129Z

Hey @pez @brandon.ringe suggest you bump :calva: that is using this version, sorry for that 😕

bringe 2021-01-28T03:14:59.129200Z

Thanks for the heads up!

bringe 2021-01-28T03:15:19.129400Z

No worries

😅 1
bringe 2021-01-28T03:58:35.129700Z

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.

bringe 2021-01-28T03:58:44.129900Z

Going to update anyway

ericdallo 2021-01-28T04:10:35.130100Z

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

ericdallo 2021-01-28T04:10:54.130300Z

the issue was that we were merging incorrectly the batch results, using only the last one

ericdallo 2021-01-28T04:11:23.130500Z

so for external deps it was missing most of deps, so hover, find defintiion and any feature regarding external deps were not working

ericdallo 2021-01-28T04:12:20.130800Z

TIL is not that easy deep merge a list of clojure maps 😛

bringe 2021-01-28T04:16:04.131100Z

Haha, I saw that change

bringe 2021-01-28T04:16:46.131300Z

Maybe I tested on too small of a project (few external deps, was just a test project) so it was working

bringe 2021-01-28T04:16:57.131500Z

New version of Calva out with latest 🎉

🎉 1
bringe 2021-01-28T21:14:43.132300Z

@ericdallo How close do you think the graalvm branch is to being done?

anonimitoraf 2021-01-29T12:34:12.134Z

Main advantages of using graalvm: • Faster start times • ?

ericdallo 2021-01-29T12:41:46.134200Z

There is more details here :) https://dzone.com/articles/profiling-native-images-in-java

1
borkdude 2021-01-29T12:42:50.134600Z

@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

borkdude 2021-01-29T12:43:01.134800Z

but it's still cool that you managed to do it

borkdude 2021-01-29T12:43:59.135Z

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

ericdallo 2021-01-29T12:44:42.135400Z

Yes, I intend to make a performance test to check if the tradeoff worth, anyway I learned a lot :p

borkdude 2021-01-29T12:45:01.135600Z

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

ericdallo 2021-01-29T12:45:09.135800Z

Yes, it's on the todo clean those things, I was trying just to make it work for the start haha

borkdude 2021-01-29T12:45:16.136Z

Note that the bigger your reflection config, the larger your image becomes. Sure

ericdallo 2021-01-29T12:45:48.136200Z

Yes, I realized that, I'll use that tool to check what is inside the image too

borkdude 2021-01-29T12:46:34.136400Z

I think the agent might think that every used clojure thing is needed because maybe the clojure compiler uses reflection during compilation

borkdude 2021-01-29T12:46:55.136600Z

not sure about this, but could be

ericdallo 2021-01-29T12:48:09.136800Z

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

borkdude 2021-01-29T12:49:07.137Z

@ericdallo Maybe you will get a better reflection list when invoking an already AOT-ed uberjar together with the graalvm agent 💡

ericdallo 2021-01-29T12:51:31.137200Z

Hum, I thout this was already happening since I used the uberjar task that has a :aot :all, how should I do that so?

borkdude 2021-01-29T12:51:55.137400Z

java -jar uber.jar -agent-blabalbla

borkdude 2021-01-29T12:52:21.137600Z

how did you run the agent?

ericdallo 2021-01-29T12:52:37.137800Z

That's how I tested with the agent, check the run-tracing-config.sh file on the pr

borkdude 2021-01-29T12:52:45.138Z

ah ok, then I don't know

😅 1
borkdude 2021-01-29T12:53:14.138300Z

the clojure compiler isn't involved anymore then, so that can't be it

ericdallo 2021-01-29T12:53:29.138500Z

maybe related to graal 21 too

borkdude 2021-01-29T12:53:37.138700Z

neh, I've seen this before

ericdallo 2021-01-28T21:28:05.133400Z

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

👍 1