Fork me on GitHub
#clj-kondo
<
2021-08-16
>
lread20:08:51

@borkdude, small weirdness with script/diff🧵

lread20:08:01

git clone 
cd clj-kondo
script/diff
returns an expected:
Linting and writing output to /tmp/clj-kondo-diff/branch.txt
Cloning into 'clj-kondo'...
remote: Enumerating objects: 12371, done.
remote: Counting objects: 100% (1395/1395), done.
remote: Compressing objects: 100% (598/598), done.
remote: Total 12371 (delta 761), reused 1172 (delta 692), pack-reused 10976
Receiving objects: 100% (12371/12371), 11.82 MiB | 1.93 MiB/s, done.
Resolving deltas: 100% (7142/7142), done.
Linting and writing output to /tmp/clj-kondo-diff/master.txt
2558c2558
< linting took 11494ms, errors: 264, warnings: 2293
---
> linting took 11589ms, errors: 264, warnings: 2293
but if I run script/diff a second time I get:
Linting and writing output to /tmp/clj-kondo-diff/branch.txt
Cloning into 'clj-kondo'...
remote: Enumerating objects: 12371, done.
remote: Counting objects: 100% (1395/1395), done.
remote: Compressing objects: 100% (598/598), done.
remote: Total 12371 (delta 761), reused 1172 (delta 692), pack-reused 10976
Receiving objects: 100% (12371/12371), 11.82 MiB | 3.03 MiB/s, done.
Resolving deltas: 100% (7142/7142), done.
Linting and writing output to /tmp/clj-kondo-diff/master.txt
1923c1923
< clojure/tools/reader.clj:18:53: warning: use alias or :refer [char desugar-meta ex-info? namespace-keys numeric? reader-conditional second' tagged-literal whitespace?]
---
> clojure/tools/reader.clj:18:53: warning: use alias or :refer [char desugar-meta ex-info? namespace-keys numeric? second' whitespace?]
2173c2173
< inlined/clj_kondo/impl/toolsreader/v1v2v2/clojure/tools/reader.clj:16:87: warning: use alias or :refer [char desugar-meta ex-info? namespace-keys numeric? reader-conditional second' tagged-literal whitespace?]
---
> inlined/clj_kondo/impl/toolsreader/v1v2v2/clojure/tools/reader.clj:16:87: warning: use alias or :refer [char desugar-meta ex-info? namespace-keys numeric? second' whitespace?]
2558c2558
< linting took 11885ms, errors: 264, warnings: 2293
---
> linting took 11884ms, errors: 264, warnings: 2293
If I rm -rf .clj-kondo/.cache and re-run script/diff all is good again, but subsequent runs of script/diff will again return the unexpected result.

lread20:08:39

Can GitHub issue this if that makes sense, lemme know.

borkdude20:08:43

yeah, I've seen this before, nothing to worry about here

lread20:08:31

Thanks, would it make sense to rm -rf .clj-kondo/.cache in script/diff to avoid confusing contributors? Or maybe that’s not a good thing to do. Dunno.

borkdude20:08:00

I think that would be good to add

lread20:08:16

Great, will do a very tiny PR for it - unless you beat me to it.

borkdude20:08:56

I'm on very slow internet in some East German town right now, so I'm pretty easy to beat right now.

lread20:08:58

Ha! Happy to do it! I’ll create git issue with above for posterity, and then PR.