Fork me on GitHub
#cljdoc
<
2021-02-12
>
wilkerlucio20:02:01

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

wilkerlucio20:02:44

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

wilkerlucio20:02:47

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

borkdude22:02:53

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

wilkerlucio22:02:25

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

wilkerlucio22:02:15

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 "" :sha "dd81ae8724cf004f4f5e8b54e3e4464158f7d388"}

wilkerlucio22:02:01

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

borkdude22:02:51

Why are you posting this in #cljdoc btw?

borkdude22:02:04

I am linting like this:

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

wilkerlucio22:02:35

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

wilkerlucio22:02:00

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.

borkdude22:02:00

np, let's continue ;)

borkdude22:02:17

Unfortunately not

borkdude22:02:12

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

wilkerlucio22:02:24

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

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

borkdude22:02:23

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

wilkerlucio22:02:54

ok, not just here 🙂 will open an issue

borkdude22:02:56

Fixed on master, I think

💯 1
borkdude22:02:48

I'll add some tests around this tomorrow