I feel like I've asked this before but... Is there a way to tell LSP to use a specific version of clj-kondo or a specific binary? Or is the LSP binary built with a version of clj-kondo baked inside it?
Yep, I'm taking a look right now
https://github.com/clojure-lsp/clojure-lsp/pull/2377, auto bumping working!
Confirmed! I had to delete the .lsp/.cache folder to force a full re-analysis of the project, but I am now getting the expected Clojure 1.13 support from cjl-kondo in VS Code!!
Much appreciated @ericdallo @borkdude Having the very latest of both projects via nightly builds is awesome!!
๐
If you think clj-kondo can reasonably catch keys! related errors by static analysis and it doesn't currently do so, let me know
Now all my red squiggles are gone at work, I'll pay attention to that!!
I'm pretty sure it's embedded and doesn't shell out. Doing a custom clojure lsp build with the bumped kondo isn't too tricky though.
Bump lsp to clj-kondo main and use the nightly
Cc @ericdallo
I already use LSP nightly. I guess it would be nice if LSP nightly used latest clj-kondo main as a matter of course? I don't know what LSP's nightly build process looks like but that would seem like a good way to get "real" nightly builds of LSP/kondo for testing more easily for everyone.
Yeah would be nice, don't know how that would work but we could try
My only concern is kondo break LSP, but I think we can do this only if tests keep passing
I would expect official releases of LSP to continue to depend on official releases of clj-kondoโbut for nightly builds... those can already break for some folks so is it really more risk?
If tests break, someone need to check because we could break some or a lot of LSP. So my idea is: we auto bump kondo if tests pass
That system would also be good for me to discover earlier if LSP breaks. We've had some issues in the past but I think it's been years now since we last had any
Breakages seem very rare these days (testament to all y'all as maintainers) and discovering them early via nightly builds seems like a good thing... Most people use stable builds, I think, not nightlies?
(of course, I use nightliesโbut then I run Clojure alphas in production so... ๐ )
I always use clj-kondo bleeding edge
But I don't auto update LSP locally, I probably should
ok, I managed to create a CI that checks hourly if kondo has a new snapshot release, if so, it run tests and commits to LSP master automatically, generating a nightly build, otherwise it opens a PR on clojure-lsp with the bump so we can analyze the changes and debug why failed if happens
excellent :)
Use case: I want LSP to use the latest master version of clj-kondo that I've installed.
Michiel pointed me at editor integration docs for clj-kondo that give an example of writing a script that runs (instead of the default LSP), that uses clojure to run a specific version of LSP and a specific version of clj-kondo but that's not really what I want to do here...
interesting, I thought the only real way was with a custom build
And every commit to master for kondo produces a new snapshot? Cool. Thank you!
Hmm, I just restarted LSP to pick up the latest and got:
clojure-lsp version used: 2026.07.05-02.45.55-nightly
clj-kondo version used: 2026.05.26-SNAPSHOT
So that's not a recent clj-kondo snapshotโso I'm guessing the answer to my last Q is that commits to master on clj-kondo do not create a new snapshot @borkdude?@seancorfield that is correct, the version number is hardcoded in the build as resources/CLJ_KONDO_VERSION and is only updated once I do a release
I'd be fine if clojure-lsp also baked in the clj-kondo commit, I think I've brought this up before perhaps
That may not be that easy since this comes from the dep version during Clojure runtime
you can write a file during the build
Yeah seems a little bit weird to me
$ bb describe
{:babashka/version "1.12.218-SNAPSHOT"
:git/sha "83a87fa7fe9a799146c7905c3db19e3d577b7dd6"not weird at all, imo
IIRC kondo jars are uniques, they have a number with the date or so, why we can't use that?
yeah sure, just use that ;)
except that those version numbers don't mean anything to normal people since they are internal to clojars, kinda
I think you can coorelate with commit checking the build
Just need to check how I can use that since I get that in runtime
this is how I add the commit sha in bb: https://github.com/babashka/babashka/blob/2e036f9370fb1c75b926a6ad193367323de0ae00/src/babashka/main.clj#L117 the env var is populated by the build
note that you also have to set it in your graal properties, else graalvm won't capture it at build time: https://github.com/babashka/babashka/blob/2e036f9370fb1c75b926a6ad193367323de0ae00/resources/META-INF/native-image/babashka/babashka/native-image.properties#L66
Okay... so @borkdude commits to master don't create new snapshots, so how would LSP pick up the latest master as a dependency?
(I have several of my projects creating a new snapshot and pushing it to Clojars every time the main branch gets a commit, so the latest snapshot jar is always the latest main branch build)
(I was hoping to get :keys! / & support via LSP to test, without having to setup customer builds locally, so I don't have to do manual setups on each machine ๐ )
It's just the visual that says snapshot @seancorfield, in the end we are using the latest master commit
The thing is that is hard from clojure to tell which version of a jar we are using, so kondo and LSP write to a file, the thing is in kondo, the snapshot file is only updated each release
I thought clj-kondo master supported the 1.13 syntax? I'm not seeing that working...
I need to double check if the mechanism I created is working and LSP is using latest kondo master, just checking the deps.edn, but I'm AFK rn
Okay, well, it doesn't seem to have 1.13 syntax support, so I suspect it's not picking up master. I wasn't actually expecting y'all to work on it over the weekend so I really do appreciate the progress so far! gratitude
I looked at the failed GHA runs: the bump job is trying to update the main branch after the tests passโbut the main branch is protected so the git push fails, and so the job falls back to a PR instead.
@ericdallo FYI: when the bump clj-kondo job runs, it doesn't trigger a nightly buildโI think that's a GHA limitation, that a job that modifies master doesn't trigger jobs that run on master commits, to avoid cascading jobs.
hum, I'm seeing it triggering https://github.com/clojure-lsp/clojure-lsp/actions/runs/28869150418/job/85630996592
which resulted on https://clojurians.slack.com/archives/C032YH7P0R2/p1783431262037159
Ah, I misread the time of the last hourly clj-kondo bump job. There's just been some updates to clj-kondo master, and the hourly job hasn't picked it up yet... another 20 minutes ๐ I'm so impatient ๐ I thought I'd heard Alex say one GHA couldn't trigger another one but maybe I misunderstood...