This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (1)
- # bangalore-clj (3)
- # beginners (73)
- # boot (1)
- # calva (88)
- # cljdoc (13)
- # cljsrn (1)
- # clojure (65)
- # clojure-finland (1)
- # clojure-spec (14)
- # clojure-uk (1)
- # clojurescript (50)
- # core-async (4)
- # datavis (6)
- # duct (2)
- # figwheel-main (1)
- # off-topic (15)
- # pedestal (16)
- # planck (11)
- # re-frame (3)
- # shadow-cljs (19)
- # yada (3)
Hi there @martinklepsch, I am building up some unit tests - when you have a moment I have a few questions. 🙂
I am looking at your playground test area under
test-sources. I see stuff that is obviously useful for tests, but am unsure about other stuff. Like https://github.com/cljdoc/codox/blob/b29b16ae686e3400689bbdc93df57200b709443d/codox/test-sources/codox_test/macro.cljc#L11 this behaves differently under clj and cljs and am wondering if it merits an automated test of some sort.
Also.. I see specs https://github.com/cljdoc/codox/blob/cljs-proper/codox/test-sources/codox_test/spec.cljc and https://github.com/cljdoc/codox/blob/cljs-proper/codox/test-sources/codox_test/spec_two.cljs - what’s the expectation for those?
These were created to reproduce one particular issue that ultimately didn't have to do anything with spec, don't recall the details right now but probably fine to ignore/delete for now
And… what is expectation for records? https://github.com/cljdoc/codox/blob/cljs-proper/codox/test-sources/codox_test/record.cljc
For records, I think the intent might be to exclude them from docs (is this the config you use? https://github.com/cljdoc/cljdoc/blob/139a5a6c8094ef05cde24b93ef942b0882dbb22f/modules/analysis-runner/resources/impl.clj.tpl#L24). This does exclude them from Clojure but only partially excludes them from ClojureScript. This might be why I see a cljs only records up on cljdoc, for example: https://cljdoc.org/d/metosin/reitit-ring/0.3.1/api/reitit.coercion#CoercionError
For records we filter out the automatically generated constructor functions (->Record, map->Record), the record itself should be listed. That it is not in Clojure seems like a bug.
Thanks. Ah I got it backwards. Ok, I will see if there is a clear and easy fix, if not I will raise a separate git issue.
Oh wait... let me make sure I understand... So for
You would expect to see both Foo and bar in docs?
(defrecord Foo [a b]) (def bar (->Foo 1 2))