This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-12-03
Channels
- # adventofcode (151)
- # asami (34)
- # babashka (43)
- # beginners (111)
- # cider (2)
- # clj-kondo (6)
- # cljdoc (12)
- # clojure (140)
- # clojure-australia (10)
- # clojure-europe (14)
- # clojure-france (5)
- # clojure-gamedev (5)
- # clojure-nl (4)
- # clojure-uk (10)
- # clojurescript (20)
- # community-development (9)
- # conjure (1)
- # core-async (4)
- # cryogen (3)
- # cursive (2)
- # datomic (17)
- # emacs (9)
- # events (1)
- # fulcro (27)
- # juxt (8)
- # kaocha (2)
- # lambdaisland (14)
- # off-topic (23)
- # pathom (37)
- # pedestal (2)
- # re-frame (8)
- # reagent (8)
- # reclojure (9)
- # reitit (5)
- # reveal (34)
- # shadow-cljs (27)
- # spacemacs (10)
- # tools-deps (123)
- # vim (28)
- # xtdb (17)
Hi @martinklepsch! I have learned that #fulcro has experienced quite a few issues with Cljdoc such as 👇 I have browsed through the GH issues but do not see anything that would seem relevant, weirdly. Is for example this one a known issue? And are there some know limitations to cljs support? Thanks! (I love both Cljdoc and Fulcro so it would be great if they could work together.)
Thanks for checking in and yeah, definitely happy to help with this as much as I can. Could you point me to the source file for this? One issue I immediately think of is that if the file is a cljc file #js is basically invalid syntax
We could could probably add a data reader to support #js
Even if some files are invalid we don’t necessarily care about guaranteeing correctness or something like that
I think that was the point - yes, #js is invalid in clj, therefore there is added a custom reader to make it acceptable also in clj. The file and line: https://github.com/fulcrologic/fulcro/blob/4da887d934d8f9c8a225f3b972a375d634a18138/src/main/com/fulcrologic/fulcro/components.cljc#L845
I’d be open to do something like that for cljdoc 👍
Don’t have a pointer where that would be done from the top of my head but maybe @UE21H2HHD has a pointer :)
But maybe there’s also a way to properly pick up data_readers from analysed projects
How do you read in the code? E.g. the EDN reader (which you don't use) can be provided with a list of data readers. And you know where those are declared, in data_readers.clj[c]
at the top of the classpath.
I don't know if it would be possible to have a fallback data reader that simply replaces everything unknown with nil, that would be I assume good enough for analyzing the code and simple.
> Default reader tags are defined in https://clojure.github.io/clojure/clojure.core-api.html#clojure.core/default-data-readers but may be overridden in data_readers.clj
or by rebinding https://clojure.github.io/clojure/clojure.core-api.html#clojure.core/%2Adata-readers%2A. If no data reader is found for a tag, the function bound in https://clojure.github.io/clojure/clojure.core-api.html#clojure.core/%2Adefault-data-reader-fn%2A will be invoked with the tag and value to produce a value. If default-data-reader-fn is nil (the default), a RuntimeException will be thrown.
so it should be possible