clj-kondo

sg-qwt 2024-07-30T08:27:51.894579Z

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. 🤔

✅ 1
sg-qwt 2024-07-30T08:28:37.272949Z

clj-kondo v2024.03.13 btw

sg-qwt 2024-07-30T08:39:34.284759Z

tried latest clj-kondo v2024.05.24 from nixpkgs-unstable, doesn't seem to make a difference, still hit the same bug

borkdude 2024-07-30T08:46:33.652399Z

could it be that the files in the dependency are empty?

borkdude 2024-07-30T08:47:18.669259Z

which version of coffi are you using, then I can double-check

sg-qwt 2024-07-30T08:48:43.586859Z

: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

sg-qwt 2024-07-30T08:49:04.401629Z

where would I find those files in the dependency?

borkdude 2024-07-30T08:55:06.832849Z

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}}}

borkdude 2024-07-30T08:55:24.349909Z

perhaps the disk isn't writeable or so?

borkdude 2024-07-30T08:55:36.157249Z

(in that case I would have expected an exception)

sg-qwt 2024-07-30T08:55:39.272759Z

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

borkdude 2024-07-30T08:55:50.793119Z

ah well, then that might be the issue

borkdude 2024-07-30T08:56:08.161649Z

they didn't turn up empty here, but perhaps deleting that entry from .gitlibs might help

sg-qwt 2024-07-30T09:05:14.157789Z

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.😂

borkdude 2024-07-30T09:05:56.753959Z

Don't know, but perhaps upgrade the clojure CLI and git just in case

sg-qwt 2024-07-30T09:08:04.741139Z

thanks anyway!

borkdude 2024-07-30T09:08:59.185159Z

happy clojure-ing!