Fork me on GitHub

Hello cljdocers! Thanks for this very cool project. Also thanks for supporting testing locally, it is so very helpful.


I am currently working on bringing rewrite-cljs up to date with rewrite-clj. Rewrite-clj uses an internal version of potemkin’s import-vars. I thought that was cool, so I’ve got a kind-of working version of import-vars for cljs, but I can’t seem to override a function’s file and line metadata in cljs. Then I wondered maybe cljdoc might have some feature to help? Can cljdoc be configured to have a function in one namespace directly point to source of another function in another namespace?


Only for the purposes of documentation generated by cljdoc, of course.


Hey! cljdoc uses cljs.analyzer.api/ns-publics to extract this information. I have to jump into a meeting right now but maybe that's a useful pointer to further investigate why things differ between cljs/clj


Thanks @martinklepsch, I shall take a peek. My little cljs import-vars is using cljs.analyzer.api/resolve and it sees the file and line number but applying it as metadata to my target fn just doesn’t stick. I’ll take a peek at cljdoc source to see what I can learn.


by the way, I think the version numbering scheme you use is nice - including the both the count and sha seems like a good idea to me.

simple_smile 4

there's a -main in that project that I've used for debugging this kind of thing in the past:


note that this is all on the cljs-proper branch


nice code! so easy to read.


But James Reeves‘


Oh that weavejester sure has some talent!


to be clear, I’ve not found anything wrong with cljdoc, just trying to overcome a limitation with my cljs version of import-vars. I’ll wander over to clojurescript and ask about ability to override file and line metadata there.


I wonder if I am thinking of something like codox’s source-uri


Anyway, I’ll shut up here until I learn more over at #clojurescript


@lee i think it’s great you came by to raise this. I agree that it’s likely not an issue with cljdoc but would still be interesting to figure this out.


Also re-frame has had similar issues with the way they imported vars into the core namespace. Maybe someone has written a clever macro to solve that there. @danielcompton could potentially can give a pointer here


Thanks, you are most kind!