Weird thing as I'm playing with https://github.com/IGJoshua/coffi
1. added coffi as git dep
2. prep that lib with clj -X:deps prep
3. run clj-kondo --copy-configs --dependencies --lint "$(clojure -Spath)"
it says
Configs copied:
- .clj-kondo/org.suskalo/coffi
But I found both .clj-kondo/org.suskalo/coffi/config.edn .clj-kondo/org.suskalo/coffi/hooks/coffi.clj file ended up empty somehow.. Do notice some EOF error on first copy try, but cannot seem to reproduce it. But as I delete .clj-kondo and retry copy-configs always get me those two empty files. 🤔clj-kondo v2024.03.13 btw
tried latest clj-kondo v2024.05.24 from nixpkgs-unstable, doesn't seem to make a difference, still hit the same bug
could it be that the files in the dependency are empty?
which version of coffi are you using, then I can double-check
:deps {io.github.IGJoshua/coffi {:git/sha "917141b6a2cea4f4c556f5a54c51c5688c5b5590"}} i'm using the jdk-21 branch latest commit, which you'll need jdk22 to do proper prep if you'd like to try
where would I find those files in the dependency?
Seems to work alright here:
$ cat .clj-kondo/org.suskalo/coffi/config.edn
{:hooks {:analyze-call {coffi.ffi/defcfn hooks.coffi/defcfn}}
:linters {:coffi.ffi/invalid-syntax {:level :error}}}perhaps the disk isn't writeable or so?
(in that case I would have expected an exception)
those two files under my home ~/.gitlibs are indeed empty as well
~/.gitlibs/libs/io.github.IGJoshua/coffi/917141b6a2cea4f4c556f5a54c51c5688c5b5590/resources/clj-kondo.exports/org.suskalo/coffi/config.edn
~/.gitlibs/libs/io.github.IGJoshua/coffi/917141b6a2cea4f4c556f5a54c51c5688c5b5590/resources/clj-kondo.exports/org.suskalo/coffi/hooks/coffi.clj
ah well, then that might be the issue
they didn't turn up empty here, but perhaps deleting that entry from .gitlibs might help
I deleted everything from .gitlibs and .clj-kondo and retry, now copy-configs works as expected. I wonder what caused those two files being empty in gitlibs in the first place.😂
Don't know, but perhaps upgrade the clojure CLI and git just in case
thanks anyway!
happy clojure-ing!