cljdoc

https://cljdoc.org/ & https://github.com/cljdoc/cljdoc
frozar 2020-03-16T22:16:22.016100Z

Hi, I really new to cljdoc and really enthousiast about it. I'm developing a clojurescript library which uses the npm package "roughjs". I'm using shadow-cljs to build it. To acces the javascript code, I import the npm lib as follow:

(ns roughcljs.core
  (:require ["roughjs/bin/rough" :default rough])
You can check it out here: https://github.com/frozar/roughcljs/blob/5171daddaf31f164eaefdedfdefddd5e3559c255/src/main/roughcljs/core.cljs#L2 I would like to run cljdoc on my package so I use the docker image generously provided. I build the jar of my project, and install it locally. Than I use the docker to run the analysis of the .cljs file of my project and I get this error:
Execution error (ExceptionInfo) at cljs.analyzer/error (analyzer.cljc:756).
No such namespace: roughjs/bin/rough, could not locate roughjs_SLASH_bin_SLASH_rough.cljs, roughjs_SLASH_bin_SLASH_rough.cljc, or JavaScript source providing "roughjs/bin/rough" (Please check that namespaces with dashes use underscores in the ClojureScript file name) in file /tmp/cljdoc-frozar-roughcljs-0.1.1-SNAPSHOT6990170541669620385/contents/roughcljs/core.cljs
That's normal because the generated jar archieve doesn't contain the javascript files. To use my library, one has to specify it in its clojurescript dependancies and to install the npm dependancies with a command line like npm add roughjs. My question is: Is it possible to ask to cljdoc to not analyse some namespace? Particularly the javascript namespace.

martinklepsch 2020-03-17T10:20:40.020600Z

Hey & thanks for already looking into this a bunch. The analysis code currently doesn’t know what to do with string namespaces, there has been some work in that direction in a new analyzer codebase but that hasn’t yet been integrated back into into cljdoc: https://github.com/cljdoc/cljdoc-analyzer/issues/5

frozar 2020-03-17T12:28:27.021300Z

Ok, I didn't know you were already aware of it, so in doubt I created an issue on the cljdoc repo: https://github.com/cljdoc/cljdoc/issues/380 It maybe should be closed... By the way, I hope this feature would be soonly available, because I think its the last trouble I have to overcome to use cljdoc ❤️

frozar 2020-03-17T12:31:49.021600Z

Also, before getting this issue, I had a syntax analysis error from codox because I use the :default keyword in requirement. This keyword is specific to shadow-cljs buildsystem. Do you plan to handle this keyword? Or this issue will go away with the resolution of https://github.com/cljdoc/cljdoc/issues/380 ?

seancorfield 2020-03-16T22:40:04.017300Z

@martinklepsch I'm seeing something odd trying to update next.jdbc -- https://cljdoc.org/builds/27322 shows the "analysis-job-failed" error but when I look at the build on CircleCI, it seems to have succeeded https://circleci.com/gh/cljdoc/builder/18560

seancorfield 2020-03-16T22:40:22.017800Z

https://cljdoc.org/d/seancorfield/next.jdbc/ shows the docs were imported OK but the API docs are missing.

seancorfield 2020-03-16T22:41:05.018700Z

(I re-ran the cljdoc job, just in case it was a transient failure, but it seemed to fail again the same way)

seancorfield 2020-03-16T22:42:08.019500Z

It successfully imported the API stuff a few days ago https://cljdoc.org/d/seancorfield/next.jdbc/1.0.405/doc/readme (although the cljdoc badge is broken now for that -- it was working when I did that release/build).

seancorfield 2020-03-16T23:44:31.020500Z

Looks like it has sorted itself out now... 1.0.409 is now showing the API docs and the badge is also working...