This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-04
Channels
- # announcements (4)
- # aws (3)
- # babashka (58)
- # beginners (59)
- # biff (6)
- # cider (3)
- # clj-kondo (48)
- # clj-on-windows (1)
- # cljdoc (1)
- # clojure (136)
- # clojure-europe (19)
- # clojure-gamedev (7)
- # clojure-germany (2)
- # clojure-nl (7)
- # clojure-norway (1)
- # clojure-portugal (1)
- # clojure-uk (4)
- # clojurescript (41)
- # community-development (2)
- # core-async (5)
- # cursive (10)
- # data-oriented-programming (1)
- # data-science (1)
- # datahike (5)
- # datomic (60)
- # docker (2)
- # emacs (13)
- # figwheel-main (19)
- # fulcro (12)
- # graalvm (9)
- # holy-lambda (41)
- # honeysql (14)
- # introduce-yourself (3)
- # jobs (4)
- # lsp (11)
- # nrepl (1)
- # off-topic (9)
- # other-languages (2)
- # pathom (22)
- # portal (5)
- # re-frame (17)
- # remote-jobs (4)
- # reveal (14)
- # shadow-cljs (1)
- # tools-build (7)
- # tools-deps (47)
- # xtdb (8)
- # yada (2)
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
Right - this only pertains to the lein plugin - not when running clj-kondo as standalone
But the lein plugin should work as well, no? 🙂
I’d guess it’s from here https://github.com/clj-kondo/lein-clj-kondo/blob/master/project.clj#L8
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 😬😅
Oh, not really, it's using a way older clj-kondo https://github.com/clj-kondo/lein-clj-kondo/blob/master/project.clj#L8
sounds good! 😃
Thanks @UKFSJSM38 :thumbsup: And @U04V15CAJ 🙂
sure, will do! Meanwhile @anders982 I suggest you take a look at https://github.com/clojure-lsp/lein-clojure-lsp, which has clj-kondo diagnostics and more features like clean-ns and format
interesting! will do, thanks :thumbsup:
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
I'm not aware of that feature @U04V15CAJ if we find it, I'd like to use on lein-clojure-lsp as well 😂
@UKFSJSM38 you were right - removing the lein-kibit plugin “fixes” the issue
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
https://github.com/clojure-lsp/clojure-lsp/blob/master/cli/build.clj#L114
oh, good point, I think this was because of a old refactor, we should not uber indeed!
would that be related to my problem, or just a good fix regardless? 🙂
:thumbsup: I’ll keep a watch for updates then, thanks!
Thanks Eric :thumbsup:
@UKFSJSM38 I saw the new update and tag (0.1.4) to lein-clj-kondo, but looks like the publishing step failed
Fixed, released lein-clj-kondo 0.1.4 @anders982
Awesome, thanks! 😃
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 identicalWe release lein-clj-kondo with lein deploy clojars
, that should not create a uber, but a jar only, right @U04V15CAJ?
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 toAny clues @U04V15CAJ ?I don't know too why that happens