cljdoc

https://cljdoc.org/ & https://github.com/cljdoc/cljdoc
wilkerlucio 2021-02-12T20:27:01.019100Z

hello, I'm trying to use the exports feature from Kondo, but when Kondo copies the exported file, instead of the file contents I'm seeing a file path there

wilkerlucio 2021-02-12T20:27:44.019200Z

expected to have on file:

{:lint-as {com.wsscode.pathom3.connect.operation/defmutation clojure.core/defn
           com.wsscode.pathom3.connect.operation/defresolver clojure.core/defn
           com.wsscode.pathom3.plugin/defplugin              clojure.core/def}}
actual config.edn contents (generated by kondo):
/Users/wilkerlucio/.gitlibs/libs/com.wsscode/pathom3/dd81ae8724cf004f4f5e8b54e3e4464158f7d388/resources/clj-kondo.exports/com.wsscode/pathom3/config.edn
this library in case I'm using from deps pulling from a github dep

wilkerlucio 2021-02-12T20:28:47.019400Z

I think this may be a bug related to git deps, because I had used this feature with jar deps and worked fine

borkdude 2021-02-12T22:23:53.019700Z

@wilkerlucio Is there anything that should be fixed on the clj-kondo side? Not sure what the problem is

wilkerlucio 2021-02-12T22:25:25.019900Z

I think this is a bug in clj-kondo, what I did was to lint dependencies, Pathom 3 is part of the deps, I expected kondo to use the resource config and pull in the project, but in this case, instead of having a config.edn with the Pathom 3 config, the file is there, but the contents is a path to the source (I guess), instead of its contents

wilkerlucio 2021-02-12T22:27:05.020100Z

like this

wilkerlucio 2021-02-12T22:28:15.020500Z

I think you can reproduce if you add the Pathom 3 git dep to the project, and ask to lint the deps com.wsscode/pathom3 {:git/url "<https://github.com/wilkerlucio/pathom3>" :sha "dd81ae8724cf004f4f5e8b54e3e4464158f7d388"}

wilkerlucio 2021-02-12T22:29:01.020700Z

sorry, I first was trying to make sure its just not some stupid setup thing I'm making, if you think its a bug I can go and file an issue

borkdude 2021-02-12T22:29:12.020900Z

I will try

borkdude 2021-02-12T22:31:51.021100Z

Why are you posting this in #cljdoc btw?

borkdude 2021-02-12T22:32:04.021300Z

I am linting like this:

clj-kondo --lint $(clojure -Spath -Sdeps '{:deps {com.wsscode/pathom3 {:git/url "<https://github.com/wilkerlucio/pathom3>" :sha "dd81ae8724cf004f4f5e8b54e3e4464158f7d388"}}}')
Should I see something unexpected now?

wilkerlucio 2021-02-12T22:32:07.021500Z

:face_palm:

wilkerlucio 2021-02-12T22:32:35.021700Z

about the channel, I just confused, was supposed to be in #clj-kondo

wilkerlucio 2021-02-12T22:33:00.021900Z

by that path you get this? Copied config to .clj-kondo/com.wsscode/pathom3. Consider adding com.wsscode/pathom3 to :config-paths in .clj-kondo/config.edn.

borkdude 2021-02-12T22:33:00.022100Z

np, let's continue ;)

borkdude 2021-02-12T22:33:17.022300Z

Unfortunately not

borkdude 2021-02-12T22:35:12.022500Z

Feel free to post an issue about this and I will look into it

wilkerlucio 2021-02-12T22:35:24.022700Z

ok, try going into an empty dir, and then:

mkdir .clj-kondo
clj-kondo --lint $(clojure -Spath -Sdeps '{:deps {com.wsscode/pathom3 {:git/url "<https://github.com/wilkerlucio/pathom3>" :sha "dd81ae8724cf004f4f5e8b54e3e4464158f7d388"}}}') --no-warnings
cat .clj-kondo/com.wsscode/pathom3/config.edn

borkdude 2021-02-12T22:35:44.023200Z

oh yes ok

borkdude 2021-02-12T22:36:23.023400Z

yeah, I see what you mean. /Users/borkdude/.gitlibs/libs/com.wsscode/pathom3/dd81ae8724cf004f4f5e8b54e3e4464158f7d388/resources/clj-kondo.exports/com.wsscode/pathom3/config.edn

wilkerlucio 2021-02-12T22:36:54.023600Z

ok, not just here 🙂 will open an issue

wilkerlucio 2021-02-12T22:40:44.023800Z

https://github.com/clj-kondo/clj-kondo/issues/1171

borkdude 2021-02-12T22:42:14.024100Z

Thanks!

borkdude 2021-02-12T22:44:56.024300Z

Fixed on master, I think

💯 1
borkdude 2021-02-12T22:49:48.024600Z

I'll add some tests around this tomorrow