cljdoc

https://cljdoc.org/ & https://github.com/cljdoc/cljdoc
2019-05-29T02:15:59.084100Z

Is there anything I can do to debug a failed build (this one: https://cljdoc.org/d/trident/trident/0.1.1-1-SNAPSHOT)? if not, could someone look into it for me? It failed with exception-during-import. It works with cljdoc running locally, and the git repository is linked correctly (see https://clojars.org/trident/versions/0.1.1-1-SNAPSHOT), so I'm not sure what else to try.

seancorfield 2019-05-29T03:41:40.086100Z

@foo I think it's because the tag in your pom.xml has no matching release on GitHub?

seancorfield 2019-05-29T03:42:25.086900Z

If you go to Clojars, and click the commit link (right hand side), you get a Not Found page -- because that tag doesn't exist in the repo.

seancorfield 2019-05-29T03:44:25.087400Z

(and that's true for every release you've deployed to Clojars)

seancorfield 2019-05-29T03:45:01.088100Z

The <tag> in the pom.xml file needs to be an identifiable commit in the repo so cljdoc can clone it and analyze it.

2019-05-29T03:48:23.090200Z

ah, I see. I think I made a wrong assumption when I set the tag and forgot to verify it. thanks!

martinklepsch 2019-05-29T08:09:34.092500Z

@foo I think what @seancorfield is saying is correct. The easiest way to check if things work locally is ./script/cljdoc ingest -p trident -v 0.1.1-1-SNAPSHOT — I assume you might have passed --rev argument to that in which case the issue with pom.xml <tag> wouldn't surface?

2019-05-29T15:36:26.093800Z

I didn't pass --rev but I did pass --git. It didn't occur to me to try omitting that, but yeah, leaving it out reproduces the error :thumbsup: thanks

martinklepsch 2019-05-29T15:52:24.095200Z

Thats weird though, if you could open an issue with repro steps that might be helpful, could be a bug. Any investigation on your end also welcome of course :)

2019-05-29T16:40:28.097300Z

The root problem was that I wasn't aware git push doesn't also push tags; after I did git push origin 0.1.1-1-SNAPSHOT it worked (at least it worked locally, I'll try pushing to clojars again in a sec) Is ingesting supposed to work even if <tag> is incorrectly specified in pom.xml?

2019-05-29T16:46:49.099100Z

I mean, I guess ideally even if the git import stuff broke, ingesting would go ahead and at least import the docstrings from the jar. idk if that's worth doing or not, it's also not a bad idea for people like me to just fix the git import 😉

seancorfield 2019-05-29T16:52:31.100500Z

@foo If it's any consolation, my first half dozen attempts to publish to Clojars and get cljdoc to ingest it all correctly, using deps.edn and a generated pom.xml, were all unsuccessful -- it took me a while to get my pom.xml right.

martinklepsch 2019-05-29T17:13:33.101200Z

If you have any takeaways that could be documented... 😉

2019-05-29T17:23:40.101900Z

:thumbsup: I'll do a little retrospective once I've confirmed it's all actually working and possibly open a PR for cljdoc's documentation

martinklepsch 2019-05-29T17:24:02.102100Z

👍

martinklepsch 2019-05-29T18:27:36.104Z

Got it. Well I guess there still is something we could take away from this. Probably some visual changes would help. Maybe it’s formatting or using asciidoc info/warn blocks.

2019-05-29T18:42:19.107800Z

haha yeah that was a takeaway for me too, specifically the docs show a commit hash as the value of &lt;tag&gt;, but later on when I was actually doing it, I used the git tag instead. Rather than trying to tweak the docs, more specific error messages could be better. e.g. in my case, instead of just exception-during-import, maybe say something like Couldn't find commit hash 0.1.1-1-SNAPSHOT at repo <https://github.com/>...

2019-05-29T18:48:45.110Z

Also I think I'm reeally close now... but it looks like the analysis isn't including the datomic repo (https://circleci.com/gh/cljdoc/builder/5606)

...
 :repos
 {"clojars" {:url "<https://repo.clojars.org/>"},
  "central" {:url "<http://central.maven.org/maven2/>"}}}
...
Failed to read artifact descriptor for com.datomic:ion:jar:0.9.28
...
Even though I have this in my pom.xml:
&lt;repositories&gt;
    &lt;repository&gt;
      &lt;id&gt;datomic-cloud&lt;/id&gt;
      &lt;url&gt;s3://datomic-releases-1fc2183a/maven/releases&lt;/url&gt;
    &lt;/repository&gt;
    &lt;repository&gt;
      &lt;id&gt;clojars&lt;/id&gt;
      &lt;url&gt;https://repo.clojars.org/&lt;/url&gt;
    &lt;/repository&gt;
    &lt;repository&gt;
      &lt;id&gt;maven&lt;/id&gt;
      &lt;url&gt;https://repo1.maven.org/maven2&lt;/url&gt;
    &lt;/repository&gt;
  &lt;/repositories&gt;
Could it be an issue with the s3:// protocol in the datomic repo? maybe cljdoc only works with http?

2019-05-29T18:49:17.110600Z

it works locally, presumably because I have the artifact in my .m2 directory already

martinklepsch 2019-05-29T18:50:48.111400Z

I think that might be an issue with tools deps which is used to resolve dependencies.

martinklepsch 2019-05-29T18:51:22.112600Z

As for error messages, there is an open issue to surface more low level error causes instead of just “exception-during-import”

👍 1
martinklepsch 2019-05-29T18:56:10.113500Z

https://github.com/cljdoc/cljdoc/issues/111 - happy to guide anyone through their first contribution to make this happen :)

2019-05-29T19:46:30.117100Z

I should be able to take a stab at it sometime. Also I had forgotton that you need aws credentials set up to use the datomic repo, so that must be the cause of my current problem.