Is clojure-lsp --version misreporting the clj-kondo version?
$ clojure-lsp --version
clojure-lsp 2026.07.21-16.04.36-nightly
clj-kondo 2026.05.26-SNAPSHOT
But trying it out and conversation in #CHY97NXE2 make me think the version of clj-kondo is much more recent than May.the way clojure-lsp reads the kondo version is reading the kondo version file, which is updated only during kondo releases, so it shows SNAPSHOT in nightly versions indeed
AFAICS the best would be to solve in clj-kondo this, updating the file or providing a proper public API function that tells the version
Thanks β mystery solved. π
@nomiskatz A bit more background: clojure-lsp now has an hourly GitHub Action that looks for master commits to clj-kondo and, if it finds one, it updates clojure-lsp and triggers a new nightly build.
I petitioned for this a while back because it makes it easier for those of us who use nightly LSP builds to also get the very latest Kondo version for testing.
Regular LSP builds (stable) still get the latest stable Kondo, as I understand things, so that depends on @borkdude making official Kondo releases (one is coming soon, I believe, with all the recent type flow stuff we've been testing).
We've had this discussion over and over. I think lsp should just bake in the git sha of clj-kondo in its output somewhere. I explained how to do it multiple times too. I'm not updating the version for every commit.
I don't like much have this level of couple with other lib internals how to solve the version
would be pretty handy if kondo provides a better way to provide this
it's not an internal thing
I refuse to have this discussion again. Just search slack of what I said multiple times before
np we can revisit when have a better idea or more thought
From a consumer p.o.v., the status quo is fineβonce you know that LSP nightly builds include the latest Kondo master commit. I don't care what LSP reports for KondoβI only need LSP's version for that and I watch #C032YH7P0R2 for new builds.
The point is, before publishing a new version to clojars, clj-kondo itself doesn't know what timestamp the version is going to have. But clojure-lsp has this timestamp and explicitly depends on it in deps.edn. So it's laughable that you want me to include a version. Only you have the version
got it, we would need to write to https://github.com/clojure-lsp/clojure-lsp/blob/ff68d93c16bcafff0bb6063d4f35078558eaa453/lib/src/clojure_lsp/kondo.clj#L21 during bump as well, having the version in 2 places but that could work
that file is only for stable versions. not able to update that in snapshot releases. so pretty pointless to track nightlies
Yes, I meant change to not look into that file anymore
right, that's the solution
just mention what you are depending on in deps.edn/project.clj - you have this knowledge and you can expose it
perhaps you can also get the git/sha from the pom.xml
not sure
yeah, would be nice to be able to have the version in a single place
I think I have scripted that once as example too, to try to make the point :)
so deps.edn + that code can get the version
I still don't like this option, but if you are not open to changes on kondo to provide the version, I'm ok with few changes in LSP
at least here was one script that did this: https://clojurians.slack.com/archives/CPABC1H61/p1648841819265679
I explained why I cannot provide the version. And also there is no reason for clj-kondo to provide the version because YOU dictate what version of clj-kondo you depend on. How many times....
clojure-lsp changes CLOJURE_LSP_VERSION and works for CI, so it's a matter of why kondo doesnt do a similar thing.
so when you clojure-lsp --version we have the nightly lsp version
AFAICS it's just that this is how kondo works and you don't wanna change it which is fine, definitely a option
what is in that version?
this is how clojure-lsp https://github.com/clojure-lsp/clojure-lsp/blob/ff68d93c16bcafff0bb6063d4f35078558eaa453/.github/workflows/nightly.yml#L72-L74 changing that version during nightly
I don't like to have a gazillion commits to change a version file. The person depending on this library already knows the version. So there is also no need to do it.
it's not in commits, like clojure-lsp, just nightly builds change it
yeah ok, that's an option. I guess clj-kondo could bake in the commit SHA during the build
yep
instead of the snapshot version. but that would not correspond to the mvn version which you were using
I mean, that number is only know after the deploy
I think that's acceptable, better than now
and the commit SHA is already in the pom.xml
so you have all the info
So in that CI step you just showed me, you could use the above bb (or clojure or bash) invocation to get the commit sha from clj-kondo and include it somewhere. Over overwrite the resources file, if you prefer that. 1 line of code
alright, not a one line but added the commit https://github.com/clojure-lsp/clojure-lsp/commit/9050f1b0fbec28f72a2052f0eb7796e36f4b55d8#diff-958d06f7efa75f91ba32de5cb3312161507f191c7394e31c77dfa7ac37896dccR18-R20 which is easier for people to relate with the repo changes
clj-kondo 2026.05.26-SNAPSHOT (11dc960)
thanks. why not the full sha btw?
I'm fine with btw, finally we settled it.
I don't see why this has to be a runtime function though, but whatever works
dunno, it could be the full, just thought would be easier to search/replace
see? we fixed, no need to be rude :)
was this so hard Eric? hehehe. sorry if I came across rude, but I felt like I explained it over and over and you brought up the same "it would be handy if clj-kondo could do this" which annoyed me.
π
no problem, it was not a trivial fix for me TBH because I was avoiding adding that kind of code, but I think it's more important to have users consistent and not confused, glad we fixed
> because I was avoiding adding that kind of code, that was the whole problem. you were trying to avoid to use information you already had. and it was a trivial fix. the fix could be even more trivial than this.
maybe, PRs are welcome if that looks better! in my head was more a point of "each library should be able to provide its own version and not leak to downstreams handle that"
yeah this was the point we kept disagreeing about
for ... years ;)
hehe
> each library should be able to provide its own version essentially this was already the case and now you are using that provided version/sha
all good now. π§
Thanks Eric for addressing this.
But in a REPL in a local clone of clojure-lsp, I get
(clojure-lsp.kondo/clj-kondo-version)
"2026.05.26-SNAPSHOT (03bbe1f)"I'm still seeing this in latest nightly, let me look
Fixed @nomiskatz
Nice:
clojure-lsp version used: 2026.07.22-14.40.41-nightly
clj-kondo version used: 2026.05.26-SNAPSHOT (03bbe1f)
And, yup, that's the most recent commit on clj-kondo. Thank you!