codox icon indicating copy to clipboard operation
codox copied to clipboard

Various Enhancements

Open martinklepsch opened this issue 7 years ago • 2 comments

Hey @weavejester, I've forked Codox for https://cljdoc.org for a while running on some commits that may also be interesting for mainline Codox. This PR includes a lot of unnecessary commits but I will describe the few relevant ones below and you can cherry pick whatever you like. I can also create a new PR with the ones you're interested in.

Feel free to close this PR after seeing it, it's not really intended to be merged as-is but more of a heads up and an offer to contribute some of the changes below back to Codox.

Trust cljs analyser to read macros correctly

Codox previously did two passes to also read macros for ClojureScript. This is actually no longer necessary with more recent versions of ClojureScript.

https://github.com/cljdoc/codox/commit/3079986bd9500c62775f795ec92b30a7aeb742c9

Remove 'quote from arglists

For some reason the list? check wasn't enough to remove 'quote and I ended up with 'quote in arglists. seq? did the trick (and might be more appropriate anyways?).

https://github.com/cljdoc/codox/commit/25b01ae5c471bd4d1ef4290d7724d6878157f31d

Better handle namespaces defined by multiple files

When there are multiple files (e.g. .clj and .cljc) for a namespace Codox would analyse those namespaces twice returning the analysis result twice as well. (See https://github.com/cljdoc/cljdoc/issues/155.)

https://github.com/cljdoc/codox/commit/3f2ea84ae5e27e6f527b38bbc8d8fcecc24fe47f

Better support ClojureScript 1.10.439

I noticed some issues (+ more details) with the new CLJS version. Turns out setting *analyze-deps* to false was never really supported for macro-containing namespaces and we just got lucky.

https://github.com/cljdoc/codox/commit/e0cd26910704c416611fc81f43f890a26861c221

Thanks

Thanks for your excellent work on Codox, it really helped with cljdoc and has been an inspiration in many regards 🙌 If you want I'd be happy to send you some stickers as well, just send me your address via email 🙂

martinklepsch avatar Nov 12 '18 22:11 martinklepsch

Thanks for telling me about these changes. I'll take a closer look at them later this week, but they all look like useful additions that can be merged back into Codox, so thank you for your work on this!

weavejester avatar Nov 13 '18 11:11 weavejester

I'd love to see this included into the codox project :+1:

n2o avatar Feb 15 '19 21:02 n2o