refactor-nrepl icon indicating copy to clipboard operation
refactor-nrepl copied to clipboard

Get docs working on cljdoc

Open lread opened this issue 3 years ago • 1 comments

Problem

Docs for refactor-nrepl are failing to build on cljdoc, example: https://cljdoc.org/d/refactor-nrepl/refactor-nrepl/3.5.2

(Since this repo links to cljdoc via a cljdoc badge, I assume that you'd prefer they work)

Steps already taken

@vemv has already asked cljdoc to only analyze for Clojure, this will help.

Other issues

Lein plugin

Cljdoc loads namespaces to discover the API. Leiningen is not present and therefore analysis of the lein plugin will fail. If I include leiningen-core as a provided dependency in refactor-nrepl's project.clj, cljdoc will include it and plugin analysis will succeed. So that's good.

What public API should refactor-nrepl expose on cljdoc?

After adjusting for leningen, a local test exposes the following namespaces:

image

Which seems like a bit much, right? I assume inlined-deps should not be documented. What would be the API you would expect to be exposed on cljdoc? Is the rest part of your supported public API?

Next steps

If you tell me what you'd like to see on cljdoc, I'm happy to follow up with a PR. (and possibly changes to cljdoc itself, if appropriate).

lread avatar Mar 24 '22 23:03 lread

(Since this repo links to cljdoc via a cljdoc badge, I assume that you'd prefer they work)

Yeah, for sure. For various reasons all of our projects have been kind of cursed and don't work with cljdoc (e.g. cider-nrepl and orchard don't work as well), which is a pity.

bbatsov avatar Oct 26 '22 06:10 bbatsov