@dominicm I implemented .jar caching on master
@borkdude Ooh 😁 Do you generate a master build anywhere?
I will release a new version now
Released.
Nice, I'll give that a go now. I'm currently working on the tool I was using this for :) Will give you some measures. This is one of the times where having an FX8350 is valuable - testing worst case performance.
@borkdude I'm not seeing any speedup.
@dominicm How are you linting
You should explicitly use --no-warnings
If you are not seeing messages about skipped jars, it doesn't
@borkdude That made a difference. What does --no-warnings do?
@dominicm I updated the README for that here: https://github.com/borkdude/clj-kondo/#project-setup
Is that a new flag?
Yes. > The --no-warnings flag indicates that clj-kondo is used to analyze sources to populate the cache. When enabled, clj-kondo will suppress warnings, skips over already linted .jar files and copies configuration from dependencies into the .clj-kondo directory (see config.md).
Hmm... I don't suppose older versions of clj-kondo would just ignore that flag?
they will
Ooh. Wonderful :)
Working wonderfully.
Deleting lots of code, great :). On older kondos it'll hang around longer, but that's fine.
Not much reason to not upgrade really, and I have a total of 0 users.
I just noticed that clj-kondo doesn't warn on use of _
symbols. Surprised
Here's the official announcement then. Clj-kondo v2020.11.07 ✨ New: - deps.edn linting - import configs from deps - skip over already linted .jar files and more! Release notes: https://github.com/borkdude/clj-kondo/blob/master/CHANGELOG.md#v20201107 This release is funded by @cljtogether!
There's an issue for that. Recently mentioned in this channel.
Oh nice, deps configs landed. That's awesome, I can remove that from the template too then. This makes my auto-run particularly convenient, as it'll automatically react to the inclusion of new deps on the classpath.
❯ clj -M:dev
Clojure 1.10.1
user=> "Elapsed time: 22009.876941 msecs"
❯ clj -M:dev
Clojure 1.10.1
user=> "Elapsed time: 607.153635 msecs"
❯ clj -M:dev
Clojure 1.10.1
user=> "Elapsed time: 574.688497 msecs"
Not bad :) I wonder where those last 600msecs are going.Probably linting src and test maybe?
They are tiny. Total of 52 loc
$ time clj-kondo --no-warnings --lint $(clojure -Spath -Sdeps '{:paths []}') --parallel
sci-0.1.0.jar was already linted, skipping
cheshire-5.10.0.jar was already linted, skipping
transit-clj-1.0.324.jar was already linted, skipping
datalog-parser-0.1.7.jar was already linted, skipping
bencode-1.1.0.jar was already linted, skipping
clojure-1.10.1.jar was already linted, skipping
edamame-0.0.11-alpha.12.jar was already linted, skipping
sci.impl.reflector-0.0.1.jar was already linted, skipping
tools.reader-1.3.2.jar was already linted, skipping
jackson-core-2.10.2.jar was already linted, skipping
jackson-dataformat-cbor-2.10.2.jar was already linted, skipping
jackson-dataformat-smile-2.10.2.jar was already linted, skipping
tigris-0.1.2.jar was already linted, skipping
transit-java-1.0.343.jar was already linted, skipping
core.specs.alpha-0.2.44.jar was already linted, skipping
spec.alpha-0.2.176.jar was already linted, skipping
commons-codec-1.10.jar was already linted, skipping
jaxb-api-2.3.0.jar was already linted, skipping
msgpack-0.6.12.jar was already linted, skipping
json-simple-1.1.1.jar was already linted, skipping
javassist-3.18.1-GA.jar was already linted, skipping
clj-kondo --no-warnings --lint $(clojure -Spath -Sdeps '{:paths []}') 0.01s user 0.01s system 95% cpu 0.022 total
22 ms when linting only jars
Linting only jars for me is 100ms :)
not bad either
But it's definitely not 500ms on src, so must be something else.
if you can repro anything weird with only clj-kondo, I will take a look
I think it might be a simple 500ms overhead to http://clojure.java.sh/sh... I'm... surprised
that would surprise me.
maybe you need to do shutdown-agents
I was being dumb, didn't activate the :dev alias when testing on the CLI.
tools.deps.alpha takes ~400ms to lint.
Maybe I'll try filtering to jars.
Ah and this is a git lib right
I'm considering to extend this optimization to git libs but I just wanted to get this out first
Feel free to make an issue
I think this is sensible for now, yeah :)
Btw, you may have to update flycheck-clj-kondo if you are using emacs integration if you want to get deps.edn
linting.