cljdoc

https://cljdoc.org/ & https://github.com/cljdoc/cljdoc
lread 2021-06-02T12:23:52.051900Z

I wonder if we should try to add cljdoc-analyzer (or just its cljs metagetta tests) to https://github.com/cljs-oss/canary

lread 2021-06-02T12:32:10.053600Z

Could be a win/win. Cljdoc team would discover problems early due to ClojureScript changes, and ClojureScript team would know early if their changes have affected cljdoc.

martinklepsch 2021-06-02T12:38:33.054500Z

that sounds like a good idea

lread 2021-06-02T15:47:40.056800Z

Because I don’t know/remember: why does cljdoc-analyzer supports parsing source with unknown tagged literals? I see from the https://github.com/cljdoc/cljdoc-analyzer/issues/32?.

martinklepsch 2021-06-02T16:22:54.057100Z

yeah, that #js tag was present in a cljc file I believe and broke Clojure analysis

lread 2021-06-02T16:46:27.057300Z

Ah… I see.

lread 2021-06-02T16:46:59.057500Z

I wonder if this data_readers.clj is fulcro’s way of addressing? https://github.com/fulcrologic/fulcro/blob/develop/src/main/data_readers.clj

lread 2021-06-02T16:47:40.057900Z

Do you remember if this was a widespread issue or just a problem with fulcro?

lread 2021-06-02T16:49:39.058100Z

@holyjak I think you worked on this one, do you remember?

Jakub Holý 2021-06-02T16:55:48.058300Z

It will be problem for any CLJC lib that is using #js and, in general, for any lib using any custom data literals. But the fix I made fixes that for all possible cases?

Jakub Holý 2021-06-02T16:58:09.058500Z

Yes, if you had data readers like those referenced above at root of the classpath then it would work. IMHO it's good to ignore unknown literals because 99% they are irrelevant for those parts of code Cljdoc care about, ie function names and docstrings. No?

Jakub Holý 2021-06-02T16:58:59.058700Z

There is a lib with custom literals for Java time classes. Should we fail parsing any lib using those?

lread 2021-06-02T16:59:06.058900Z

Thanks for the reply! I only ask because the latest version of ClojureScript broke cljdoc-analyzer’s metagetta in this area. And I was wondering if we really need to support unknown tagged literals. Or should we just expect projects to include appropriate data_readers.clj/cljc? (Maybe this would not be enough? I’m a bit fuzzy on what might be required).

lread 2021-06-02T17:01:05.059100Z

Note the ClojureScript change that broke us is currently being labelled as a regression. But while digging in, I just wondered about this feature.

lread 2021-06-02T17:01:55.059300Z

To be clear, I’m not at all saying we shouldn’t be doing this. Just trying to understand more.