clojure-emacs / refactor-nrepl

nREPL middleware to support refactorings in an editor agnostic way
Eclipse Public License 1.0
256 stars 69 forks source link

Get docs working on cljdoc #380

Open lread opened 2 years ago

lread commented 2 years ago

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

bbatsov commented 1 year ago

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