Fork me on GitHub
#lsp
<
2023-12-20
>
Alexander Kouznetsov00:12:06

How can I specify what version of clj-kondo I want to use with clojure-lsp? I don’t see this available in the config.

ericdallo00:12:08

Because that's not available in the config, you can use the #C032YH7P0R2 though which always use latest kondo

👍 1
ericdallo00:12:30

I should release a clojure-lsp version soon too

Alexander Kouznetsov00:12:35

Would it be possible to make clojure-lsp work with a version of clj-kondo I have installed?

ericdallo00:12:31

No, especially because we use a native image version via Graalvm, you can use the JVM version used for debugging and development, but I suggest avoid that

ericdallo01:12:22

Why you want a different clj-kondo ? I know know bork dude that use a local kondo installation and me because we are developers of those libs, is that for a similar purpose?

borkdude07:12:21

You can run Clojure-LSP from the JVM and use any clj-kondo version this way. I am doing this all the time. I’ll post a link later

ericdallo12:12:12

@U04V15CAJ I know this will work, but just to make it clear that I see this useful for local developemnt and not a final product for users, that's why I'd like to understand why @UHS6PHL31 wnats to run with a different clj-kondo version

ericdallo12:12:43

because he has a clj-kondo version installed and not clj-kondo clonned AFAICS

borkdude12:12:00

I don't agree that it is not useful for final consumption, it works very well

borkdude12:12:11

you can specify a mvn version of clj-kondo

ericdallo12:12:34

but from my tests the JVM version has OoM exceptiosn on huge projects that the graal version doesn't have

ericdallo12:12:41

besides faster startup (not only binary startup, but LSP startup)

ericdallo12:12:14

I mean, it may not be a problem for OP

borkdude12:12:18

I think the native image version will OoM at one point too, this is just a tuning problem

borkdude12:12:40

It would be weird to say: only use this library via native image because on the JVM it will OoM, then clearly something else is wrong

ericdallo12:12:39

yeah, makes sense

Alexander Kouznetsov18:12:49

For me it is mainly to ensure that I have the same version of clj-kondo pinned regardless of whether I’m running it from the command line, via clojure-lsp or as a dependency in a clojure project. Otherwise it becomes confusing if certain warnings or errors appear in CI, for example, but not in the IDE and vice versa.

ericdallo19:12:13

ah got it, so you use clj-kondo as a dependency of your project, interesting

Alexander Kouznetsov22:12:32

It’s not just that. People in our codebase use different tools and IDEs and I want to make sure that whoever runs clj-kondo via IDE or not, can see the same errors and warnings. I guess pinning a particular clojure-lsp version is workaround for this.

Alexander Kouznetsov22:12:29

Recent clj-kondo release of 2023.12.15 contained a number of fixes that I need, so I’m looking forward for clojure-lsp release containing this clj-kondo version.

ericdallo12:12:47

I see, well latest nightly on #clojure-lsp-builds has this clj-kondo version, but I should release this week (or next) a new version

gratitude-thank-you 1