cljdoc

https://cljdoc.org/ & https://github.com/cljdoc/cljdoc
miikka 2020-10-11T03:10:49.053300Z

So... there is a pom.xml uploaded to repo, see here: https://repo.clojars.org/miikka/clj-branca/0.1.0/clj-branca-0.1.0.pom

miikka 2020-10-11T03:11:49.053500Z

But the corresponding jar file does not contain pom.xml and I believe that's the problem.

miikka 2020-10-11T03:12:06.053700Z

That's not said in the docs but I saw some memtion of it in GitHub issues

miikka 2020-10-11T03:42:31.054500Z

Heh, now that I have figured tihs out, maybe I'll go to fix Malli...

miikka 2020-10-11T03:44:28.054900Z

Or maybe not. Ah well. Maybe I'll document it on the issue tracker of Malli.

dominicm 2020-10-11T12:59:09.055800Z

I have some time this afternoon to have a stab at fixing that a little bit so pom.xml is less required.

💪 1
lread 2020-10-11T14:24:06.059100Z

So if I understand correctly, the .pom file in the maven repo is a copy of pom.xml. But cljdoc is relying on the pom.xml in the jar, which some jars don’t include?

martinklepsch 2020-10-11T15:02:54.062300Z

the POM is accessible via the repo url and most packaging tools include it inside the jars „META-INF“ directory. In some places we rely on the file being included inside the jar but I’m not 100% sure if that’s a cljdoc thing or a tools.deps thing

dominicm 2020-10-11T15:03:23.063300Z

tools.deps can fetch deps without it being in the META-INF dir

martinklepsch 2020-10-11T15:03:44.063700Z

Tools deps supports adding a jar as a dependency in which case it has(?) to rely on the pom being inside the jar

dominicm 2020-10-11T15:10:01.063900Z

Yep

dominicm 2020-10-11T15:10:14.064300Z

I think analysis doesn't need to use that jar though

dominicm 2020-10-11T15:11:33.065100Z

It would be duplicate work, but it could just use the project instead of the jarpath/pompath.

dominicm 2020-10-11T15:12:13.065300Z

The other option is to download it and then just assume the location in $M2, checking that out now too.

dominicm 2020-10-11T15:12:23.065500Z

Maven always downloads the pom, so we wouldn't need to know urls

dominicm 2020-10-11T15:18:23.065700Z

Oh I see, we also always download the pom. Even less of a problem then :)

dominicm 2020-10-11T15:20:29.065900Z

In fact, we're already parsing the pom...

dominicm 2020-10-11T15:37:18.066100Z

For example, this (contains? #{"provided" "system" "test" "compile" "runtime" nil} (:scope %)) will solve the problem where the pom is already used.

dominicm 2020-10-11T15:37:24.066300Z

But I have a slightly better way too :)

dominicm 2020-10-11T15:58:15.066500Z

I've opened a PR to fix this :) https://github.com/cljdoc/cljdoc-analyzer/pull/30