cljdoc

https://cljdoc.org/ & https://github.com/cljdoc/cljdoc
tony.kay 2020-04-13T04:09:26.020500Z

It’s a npm dependency with a require that asks for a file out of js dist directory. I use shadow-cljs for all builds, and this is not something that is going to be in cljsjs. @martinklepsch If there is a sol’n, I’d be glad to hear it. Technically I have control of the project that is causing the failure (as a transitive dep). The requires look like this: https://github.com/fulcrologic/semantic-ui-wrapper/blob/master/src/main/com/fulcrologic/semantic_ui/collections/form/ui_form.cljs

tony.kay 2020-04-13T04:10:02.021200Z

I guess if I do some webpack madness it might work??? I avoid the std cljs tooling because shadow-cljs makes this all so much easier.

tony.kay 2020-04-13T04:10:34.021700Z

and frankly, I don’t have time to deal with that kind of stuff…my time is already pulled 6 ways

✔️ 1
martinklepsch 2020-04-13T12:30:04.023400Z

@tony.kay got it. This is something @fabien.rozar started to look into again recently, I just created a project on GitHub that collects all the relevant issues and notes, hope this is helpful to understand the problem and follow along: https://github.com/orgs/cljdoc/projects/1

martinklepsch 2020-04-13T12:30:12.023700Z

Sorry I don’t have a solution at this time! 🙂

frozar 2020-04-13T12:35:53.025300Z

@tony.kay Yes, I try to dig into this with advices from @martinklepsch: I'm hoping for the best ^^ I have exactly the same issue for a personal package, roughcljs...

tony.kay 2020-04-13T15:24:57.025900Z

@fabien.rozar has anyone considered a more source-based solution? All you need is docstrings, right? Why not just use a reader and pull them out?

tony.kay 2020-04-13T15:25:36.026500Z

I’ve got some code laying around that parses cljc I think 🙂

martinklepsch 2020-04-13T15:26:07.027200Z

😄

martinklepsch 2020-04-13T15:27:20.028800Z

For the quality of docs that cljdoc provides that’s just not going to work. What about custom macros that emit docstrings differently? What about arglists that describe option maps. What about libraries like Amazonica that derive their entire API surface at runtime?

tony.kay 2020-04-13T15:28:23.029700Z

What about an option that lets you say “source analysis is good enough”? Most projects would work with that….and if you have macros that follow standard form structure (i.e. defn/def)then you could make those simlpe configs

tony.kay 2020-04-13T15:29:04.030800Z

So, Fulcro: I have some custom macros. Most of them are intentionally shaped like defn or such so that it is easy to get tools to work with them for code completion and docs in IDE

tony.kay 2020-04-13T15:29:26.031400Z

it would just get you 95% there

martinklepsch 2020-04-13T15:29:31.031600Z

A PR would be welcome for stuff like this but given the ambition to cover the entire ecosystem it would have been the wrong approach to start with.

tony.kay 2020-04-13T15:29:44.031800Z

I see, and agree

martinklepsch 2020-04-13T15:31:00.033500Z

We’ll get this figured out eventually. The problem you’re describing is certainly not unsolvable it’s just that nobody has had sufficient time to fix it.

tony.kay 2020-04-13T15:31:33.033700Z

yep

tony.kay 2020-04-13T15:53:58.035200Z

Well, just for reference purposes, the tool I was building that was reading clj/cljs/cljc is here: https://github.com/awkay/porting-tool in case anyone wants to mine it for ideas. It was meant to be a porting/refactoring tool, but the zipper/multipass approach was kinda slow, and I just had other more interesting things to work on, so I dropped it.

👍 1