Fork me on GitHub
#cljdoc
<
2020-03-16
>
frozar22:03:22

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.

martinklepsch10:03:40

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

frozar12:03:27

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 ❤️

frozar12:03:49

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 ?

hlship19:03:13

Is there an existing discussion about supporting more of Codox's formatting in cljdoc? Codox has [[links]] that I use heavily in my documentation, as well as better support for bullet item lists, and even definition lists. AFAIK these are not processed by cljdoc, which leaves me either a) maintaining my own Codox documentation (but losing out on some great stuff that cljdoc provides) or b) stripping out such links, lists, and other things I find important or c) leaving it as is,, and it looks ugly.

martinklepsch19:03:07

@U04VDKC4G do you mean for linking to different vars?

martinklepsch19:03:12

Also — is this thread related?

hlship20:03:17

Yes, in Codox (https://github.com/weavejester/codox?tab=readme-ov-file#docstring-formats) you can create "wikilink-style links". I love using those, as my APIs try to document why and when you'd call a function, and such links really capture one or both of those.

hlship20:03:06

But Howard is smart at code and dumb at Slack 😞 Didn't mean to hijack an existing thread.

hlship20:03:05

Howard is switching ⚙️ too much ... yes, sorry about that. Links are supported, it's just the formatted lists that Codox does and cljdoc does not.

seancorfield22:03:04

@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

seancorfield22:03:22

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

seancorfield22:03:05

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

seancorfield22:03:08

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).

seancorfield23:03:31

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

hlship20:03:05
replied to a thread: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.

Howard is switching ⚙️ too much ... yes, sorry about that. Links are supported, it's just the formatted lists that Codox does and cljdoc does not.