Fork me on GitHub
Anders Eknert10:05:54

Hey! 🙂 When running clj-kondo via the lein plugin, it reports calls to abs as unresolved.. I guess it’s depending on an older version of Clojure than 1.11? Can I force it to use the Clojure version defined in my project, or should I open a ticket in the lein-clj-kondo repo?


@anders982 If you lint the clojure version that is used within your project, this should resolve itself


I don't see any such warning with the latest clj-kondo:

$ clj-kondo --lint - <<< 'abs'
linting took 140ms, errors: 0, warnings: 0

Anders Eknert10:05:05

Right - this only pertains to the lein plugin - not when running clj-kondo as standalone

Anders Eknert10:05:10

But the lein plugin should work as well, no? 🙂


I don't see why the lein plugin should have a different clj-kondo version.


well, you can bump the version yourself in your project.clj?

Anders Eknert10:05:03

How would I do that? Just adding the dependency to the project does not seem to affect what’s being used by the :plugins . Sorry for the noob questions.. this is all kinda new to me 😬😅


I'm not sure either :) maybe @UKFSJSM38 knows

🙂 1
👍 1

Hum, maybe lein-clj-kondo is using a old clojure from it's deps ?


We should bump it to latest kondo and release a new plugin version

Anders Eknert11:05:10

sounds good! 😃


well, you have full permission on that repo @UKFSJSM38, go ahead :)

👍 1
Anders Eknert12:05:33

Thanks @UKFSJSM38 :thumbsup: And @U04V15CAJ 🙂


sure, will do! Meanwhile @anders982 I suggest you take a look at, which has clj-kondo diagnostics and more features like clean-ns and format

Anders Eknert12:05:08

interesting! will do, thanks :thumbsup:

Anders Eknert12:05:00

just tried that plugin, but seeing:

$ lein clojure-lsp clean-ns --dry
clojure.lang.Compiler$CompilerException: Syntax error compiling deftype* at (rewrite_clj/node/stringz.cljc:16:1).
#:clojure.error{:phase :compile-syntax-check, :line 16, :column 1, :source "rewrite_clj/node/stringz.cljc", :symbol deftype*}
followed by a very long trace.. some known issue?


no, probably a conflict with rewrite-clj, any other plugin that uses rewrite-clj? like that old clj-kondo?


Going back to the original problem though, I think users should have a way to bump clj-kondo without changing that plugin

👍 1

I would be surprised if lein didn't support that in profiles.clj or so


I'm not aware of that feature @U04V15CAJ if we find it, I'd like to use on lein-clojure-lsp as well 😂

😄 1

Maybe try #leiningen?

Anders Eknert12:05:53

@UKFSJSM38 you were right - removing the lein-kibit plugin “fixes” the issue

👍 1

clj-kondo does not use rewrite-clj directly, it has a forked version inside of it


the problem such as above usually comes from libraries that are AOT-ed right? I hope clojure-lsp doesn't do that


yeah, AFAIK we don't do that, we just uber it on build.clj but not uber-aot


Unless I'm doing something wrong there


when deploying to clojars you should not make an uberjar


oh, good point, I think this was because of a old refactor, we should not uber indeed!


I'll fix it soon and release a version without that, thanks!

Anders Eknert13:05:03

would that be related to my problem, or just a good fix regardless? 🙂


could be related

Anders Eknert13:05:45

:thumbsup: I’ll keep a watch for updates then, thanks!


I can take a look on both things later today

Anders Eknert13:05:37

Thanks Eric :thumbsup:

Anders Eknert09:05:59

@UKFSJSM38 I saw the new update and tag (0.1.4) to lein-clj-kondo, but looks like the publishing step failed


Yeah, I had some issues with the clojars token, I'll fix it soon

👍 1

Fixed, released lein-clj-kondo 0.1.4 @anders982

Anders Eknert13:05:38

Awesome, thanks! 😃

Anders Eknert20:05:18

Finally got some time to bump the dependency. The good news is that the new version solves the “unresolved” problem from earlier version. The bad news is that it seems to have brought in the same problem I previously reported with lein-clojure-lsp — it doesn’t work as long as lein-kibit is also a in the :plugins vector 😞 The stack trace looks different:

clojure.lang.Compiler$CompilerException: Syntax error compiling var at (edamame/impl/parser.cljc:100:1).
#:clojure.error{:phase :compile-syntax-check, :line 100, :column 1, :source "edamame/impl/parser.cljc", :symbol var}
Caused by: java.lang.RuntimeException: Unable to resolve var: edn/read-symbolic-value in this context
But except for that the problem (and the workaround) looks identical


We release lein-clj-kondo with lein deploy clojars , that should not create a uber, but a jar only, right @U04V15CAJ?

Anders Eknert16:05:54

hmm… could something else have changed between releases that would cause this? it’s literally the only change I make:

❯ lein clj-kondo --lint src
linting took 299ms, errors: 0, warnings: 0

# bumping :plugins lein-clj-kondo "0.1.3" -> lein-clj-kondo "0.1.4" 

❯ lein clj-kondo --lint src
clojure.lang.Compiler$CompilerException: Syntax error compiling var at (edamame/impl/parser.cljc:100:1).
#:clojure.error{:phase :compile-syntax-check, :line 100, :column 1, :source "edamame/impl/parser.cljc", :symbol var}
If I comment out the lein-kibit plugin dependency, things work as before, but I’d rather not have to


Any clues @U04V15CAJ ?I don't know too why that happens


I don't know anything about lein plugins, sorry


Perhaps switch to deps.edn to invoke clj-kondo