cljdoc

https://cljdoc.org/ & https://github.com/cljdoc/cljdoc
seancorfield 2019-07-24T16:48:46.003600Z

The import of next.jdbc 1.0.3 failed and I don't understand why https://circleci.com/gh/cljdoc/builder/8536 -- org.clojure/java.data is in the POM and deps.edn so it should have been downloaded but it doesn't show up in the tree and so the namespace isn't available. Is this a caching issue somehow, that cljdoc's CI job has cached older deps?

seancorfield 2019-07-25T11:22:34.014200Z

@carkh you can switch back to depstar now 😁

carkh 2019-07-25T18:03:06.014400Z

I'll give it a go and tell you how it goes

martinklepsch 2019-07-24T16:54:04.003800Z

The problem might be a missing manifest file inside the jar

martinklepsch 2019-07-24T16:54:19.004Z

curl -O <https://repo.clojars.org/seancorfield/next.jdbc/1.0.3/next.jdbc-1.0.3.jar>
clj -Sdeps '{:deps {seancorfield/next.jdbc {:local/root "next.jdbc-1.0.3.jar"}}}' -Stree
is what’s happening inside the analyzer

martinklepsch 2019-07-24T16:55:20.004200Z

the decision to rely on stuff inside jars like this might be something worth reconsidering

martinklepsch 2019-07-24T16:58:08.004500Z

related-ish https://github.com/cljdoc/cljdoc/issues/275#issuecomment-479989370 (assuming you’re using depstar to build the jar)

seancorfield 2019-07-24T17:17:10.004700Z

Yup, I use depstar to build all my OSS projects.

seancorfield 2019-07-24T17:17:54.004900Z

I assumed cljdoc worked from the pom.xml file since without that it didn't build properly.

seancorfield 2019-07-24T17:19:31.005100Z

And Daniel said "It also tells you nothing about the build or compile versions of any dependencies" so why would cljdoc rely on the manifest for that?

seancorfield 2019-07-24T17:20:15.005300Z

Oh wait, I'm misunderstanding what he means there I think...

seancorfield 2019-07-24T17:21:09.005500Z

But, yeah, I think cljdoc needs to read the pom.xml file (which it could get from Clojars).

seancorfield 2019-07-24T17:23:15.005700Z

After all, when programs depend on JARs on Clojars, they use the pom.xml there to pull in the transitive dependencies, right?

seancorfield 2019-07-24T17:25:47.005900Z

(! 702)-&gt; clj -Sdeps '{:deps {seancorfield/next.jdbc {:mvn/version "RELEASE"}}}' -Stree
org.clojure/clojure 1.10.1
  org.clojure/spec.alpha 0.2.176
  org.clojure/core.specs.alpha 0.2.44
seancorfield/next.jdbc 1.0.3
  org.clojure/java.data 0.1.1
    org.clojure/tools.logging 0.2.3

seancorfield 2019-07-24T17:26:31.006100Z

So, yeah, clj gets the transitive dependencies right, based on the .pom file on http://clojars.org.

martinklepsch 2019-07-24T17:28:35.007500Z

Right but clj also properly works when providing the jar via local/root

martinklepsch 2019-07-24T17:28:46.008Z

Which is what I’ve shown in the first code snippet

seancorfield 2019-07-24T17:40:41.008200Z

But not for depstar-built JARs?

seancorfield 2019-07-24T17:44:58.008400Z

(! 703)-&gt; clj -Sdeps '{:deps {seancorfield/next.jdbc {:local/root "/Developer/workspace/next.jdbc/next-jdbc.jar"}}}' -Stree 
org.clojure/clojure 1.10.1
  org.clojure/spec.alpha 0.2.176
  org.clojure/core.specs.alpha 0.2.44
seancorfield/next.jdbc /Developer/workspace/next.jdbc/next-jdbc.jar
Confirmed. Sigh. I was really hoping to not need to deal with manifests and such like in depstar.

seancorfield 2019-07-24T17:48:02.008600Z

(mostly because depstar currently has zero dependencies and I want to keep it that way)

carkh 2019-07-24T17:52:12.008800Z

for the record i had to switch from depstar to maven because of this cljdoc issue

seancorfield 2019-07-24T18:03:34.009Z

I guess I'm going to cave and add manifest and pom support... 😐

seancorfield 2019-07-24T18:03:55.009200Z

(I'm still not going to add AOT! That's a line I will not cross!)

seancorfield 2019-07-24T18:36:27.009400Z

https://github.com/seancorfield/depstar/issues/13

carkh 2019-07-24T18:37:35.009700Z

there might be an issue with clojure.xml, at least i've witnessed most clojure tools are adding blank lines in the produced xml

carkh 2019-07-24T18:38:37.009900Z

that is when they edit the pom.xml

seancorfield 2019-07-24T18:39:01.010100Z

I won't edit the pom.xml file at all, just copy it into the JAR

seancorfield 2019-07-24T18:39:08.010300Z

I only need to parse it.

carkh 2019-07-24T18:39:16.010500Z

good then =)