This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-09
Channels
- # aws (1)
- # babashka (61)
- # bangalore-clj (5)
- # beginners (83)
- # biff (2)
- # calva (4)
- # cider (6)
- # clara (5)
- # clj-kondo (72)
- # cljs-dev (31)
- # cljsrn (28)
- # clojure (8)
- # clojure-australia (1)
- # clojure-europe (19)
- # clojure-france (1)
- # clojure-losangeles (21)
- # clojure-nl (2)
- # clojure-spec (2)
- # clojure-uk (9)
- # clojurescript (13)
- # clojureverse-ops (5)
- # code-reviews (1)
- # conjure (7)
- # cursive (4)
- # datascript (2)
- # datomic (8)
- # depstar (1)
- # emacs (3)
- # etaoin (1)
- # events (3)
- # exercism (7)
- # fulcro (6)
- # girouette (2)
- # graalvm (125)
- # honeysql (19)
- # integrant (1)
- # jobs (12)
- # lsp (1)
- # numerical-computing (1)
- # off-topic (23)
- # portal (12)
- # practicalli (1)
- # re-frame (35)
- # reitit (5)
- # releases (1)
- # remote-jobs (1)
- # shadow-cljs (51)
- # tools-deps (14)
- # vim (3)
- # xtdb (20)
Hello, in my clojure test files I am doing [clojure.test :refer :all]
from the imports and clj-kondo is warning me about the deftest
, is
and testing
as unresolved symbol. I have fixed the refer-all warning by excluding it in config.edn
but I can’t seem to get rid of the unresolved symbol warnings.
It’s probably similar to this issue - https://github.com/clojure-lsp/clojure-lsp/issues/316 but I tried clearing the .clj-kondo/.cache
and that didn’t work for me
@pratikgandhi1997 Are you using clojure-lsp?
it's a weird issue with clojure-lsp that keeps coming back. please don't throw away any data, since this might be important to get to the root of the problem
Can you show the contents of 2021.08.07-SNAPSHOT
(feel free to leave out any corporate specific data)
just created a new app with lein new app hello
and in it’s default core_test.clj
file got the same unresolved var error
I can't reproduce the issue on my own system. So it would be valuable to have your .zip file
aah, looks like that newly created project doesn’t have .clj-kondo
folder but still I am getting those errors
can you also give the sqlite.db to @UKFSJSM38?
Sure, I will DM the sqlite.db
to @UKFSJSM38
@UKFSJSM38 I think you also need to include https://github.com/clj-kondo/clj-kondo/blob/13066e47b8418072edc15a853164a2ef73ddc75a/script/compile#L20 in the graalvm resources :)
@UKFSJSM38 feel free to do a similar PR for clj-kondo to move these settings to META-INF
Fixed on clojure-lsp master @pratikgandhi1997! it should be available on next release
I was playing around with the --parallel
option to see how much it improved linting performance, but I fail to see any difference. My cpu monitor also reports that only a single cpu core is being utilized while linting. Is this expected or have I messed up something?
I'm doing just clj-kondo --parallel --lint src/
.
how big is the src folder?
not sure if this is a useful data point, but if I lint the src
folder from the babashka repo it takes about 520 +/- 5 ms, regardless of --parallel
@U0178V2SLAY sources are grouped per directory and jar file, this is why you aren't seeing any difference
Ah, I see, thanks!
Hmm, I’m almost certain I tried that. I’ll retry later and see if I can spot a difference
This:
find src -type d | xargs clj-kondo --parallel --lint
vs this:
find src -type d | xargs clj-kondo --lint
seems to make a differencehow does clj-kondo handle the situation where you supply "overlapping" directories? e.g. --lint first:first/second:first/second/third:...
?
because I think that what happens if you use find ...
, I guess?
yeah, I assumed that when I got a bunch of "redefined vars" warnings when trying that find invocation :)
it could probably filter this out, but I don't think it's very common to do it like this
but back to the original issue: if I supply several sibling folders with --lint src1:src2:..:srcN
-> --parallel
improves the performance
so I guess it's working as intended, but leveraging the benefits of --parallel
when linting a project itself is tricky. which is fine, as the typical performance of clj-kondo is fast enough for most projects
also when you use --dependencies
it will skip already linted .jar
files with is another perf optimization
is a hook the best way to indicate that a macro creates multiple defn
s?