cljdoc

https://cljdoc.org/ & https://github.com/cljdoc/cljdoc
2019-02-04T19:53:03.067700Z

I looked through the docs I could find, and judging from the issues, it seems that it is not possible to exclude functions and namespaces from being documented?

2019-02-04T19:53:20.068200Z

is there a reference for what can go in doc/cljdoc.edn somewhere?

2019-02-04T19:54:15.069200Z

I would like to exempt certain functions from the published docs. I also have namespaces that really exist just to share code between clj and cljs, and would like to not include them in the resulting docs

2019-02-04T19:55:08.070100Z

one more question: it seems that docstrings from cljc files are duplicated - once as clj docstring and once as cljs docstring. is this by design or an unintended by-product?

martinklepsch 2019-02-04T20:30:27.070800Z

You can add :no-doc metadata to the function or namespace you’d like to hide

martinklepsch 2019-02-04T20:30:46.071600Z

If this is not part of the library authors guide linked on the home page please open an issue

martinklepsch 2019-02-04T20:31:02.072100Z

No reference at this point but a good idea

👍 1
martinklepsch 2019-02-04T20:31:50.073Z

Are you seeing them as different or are you asking about the internals of cljdoc and how stuff is stored

2019-02-04T21:19:18.073900Z

I got the same docstring listed twice for every function in a cljc file

2019-02-04T21:21:50.074700Z

It was, sorry 😞 Can't believe I missed that

martinklepsch 2019-02-04T21:22:42.074900Z

that's odd, have a link?

martinklepsch 2019-02-04T21:22:48.075100Z

No worries! 🙂

2019-02-04T21:24:24.075300Z

no, it happened locally

2019-02-04T21:24:45.075500Z

it doesn't seem to have happened on http://cljdoc.org, so maybe there's some kind of accumulated state?

martinklepsch 2019-02-04T21:24:58.075700Z

So usually the docstrings are only shown separately if they're different between platforms (clj/cljs)

martinklepsch 2019-02-04T21:25:47.075900Z

I can't think of a reason why this would be different on http://cljdoc.org

2019-02-04T21:26:04.076100Z

I now see that there are minor differences - e.g. I fixed a link, and only one of the docstrings show the correct one

2019-02-04T21:26:42.076300Z

could it be that when running locally, clj is taken from the jar, and cljs is taken from the git source or something?

2019-02-04T21:26:54.076500Z

the cljs one is the most updated one

2019-02-04T21:27:05.076700Z

this is very likely user error

martinklepsch 2019-02-04T21:27:19.076900Z

both are taken from the jar

martinklepsch 2019-02-04T21:28:31.077100Z

all vars/namespaces for a versioned artifact are wiped before "new" ones are imported so it should not be possible that one is updated and one isn't

2019-02-04T21:29:50.077300Z

2019-02-04T21:29:53.077700Z

here's an example

2019-02-04T21:30:01.077900Z

notice the link is fixed in the cljs version

2019-02-04T21:30:29.078100Z

this docstring exists in a cljc-file, so somehow it ended up with a different version for clj and cljs

martinklepsch 2019-02-04T21:31:43.078300Z

hm. I wish I had an explanation for that 🙂

2019-02-04T21:32:39.078500Z

not a big problem. I would guess this resulted from multiple runs with the same parameters

martinklepsch 2019-02-04T21:33:55.078700Z

Still not really possible in my mental model... if you end up understanding how to reproduce it, please share 🙂

martinklepsch 2019-02-04T21:36:44.079200Z

Here's the code where old data is deleted before new data is imported

2019-02-04T21:37:12.079400Z

very strange indeed... I just re-ran it and now I have only one string again, and the fixed links etc are gone 🙈

martinklepsch 2019-02-04T21:37:28.079600Z

one thing that might make sense is to unzip your jar and take a look at the files inside. if everything actually ends up as cljc files and that the docstrings are as you expect

2019-02-04T21:37:53.079800Z

I must have done something strange to the ingest script

2019-02-04T21:38:32.080400Z

one more question while I'm on it - no matter what I pass to ingest --git I see this:

2019-02-04T21:38:35.080700Z

INFO [2019-02-04 22:36:28,683] clojure-agent-send-off-pool-0 - cljdoc.analysis.git Cloning Git repo {:url null :revision master}

martinklepsch 2019-02-04T21:39:11.081200Z

@christian767 this was a bug which has been fixed earlier today, can you pull and retry?

2019-02-04T21:39:46.081900Z

ah, cool

martinklepsch 2019-02-04T21:40:09.082400Z

unfortunately the workflow described in "Running cljdoc locally" isn't tested in CI and so every now and then some change breaks things

2019-02-04T21:40:51.083Z

I understand. Everything else was a breeze to get up and running, so 👍 for this workflow

2019-02-04T21:41:03.083300Z

yup, git repo picked up correctly

martinklepsch 2019-02-04T21:41:09.083500Z

🙌

2019-02-04T21:41:45.083800Z

🙌

2019-02-04T21:48:41.084500Z

btw the pack.alpha thing was solved. it was a case of trailing paths vs no trailing paths in the jar

martinklepsch 2019-02-04T21:49:00.084800Z

yep, figured it out too 🙂

martinklepsch 2019-02-04T21:49:18.085200Z

(by which I mean I noticed that a more recent version of pack.alpha works)

martinklepsch 2019-02-04T21:49:25.085500Z

but that explanation sounds about right

2019-02-04T22:22:11.086700Z

final question: when I run ingest with --jar /Users/christian/projects/mylib/myjar.jar it still looks up the jar from ~/.m2. does the jar have to live in ~/.m2?

martinklepsch 2019-02-04T22:32:45.087100Z

@christian767 that would be a bug

martinklepsch 2019-02-04T22:34:13.087400Z

@christian767 fixed in master

2019-02-04T22:34:41.087600Z

👍

2019-02-04T22:35:02.087800Z

that was fast 🙂