Fork me on GitHub
#cljdoc
<
2019-04-05
>
lread00:04:34

Ah I see from your previous code you shared with me that you use the the cljs-proper branch on your codox fork?

martinklepsch08:04:02

@lee great to hear you're making progress, followed your discussion in #clojurescript as well 🙂

martinklepsch08:04:28

@lee cljdoc uses the cljs-proper branch, that's right

martinklepsch08:04:59

I'm definitely open to respecting :file metadata when it's present and if such change wouldn't cause any issues with the "usual case"

lread16:04:22

Thanks! I’ll take a look. I notice that you’ve adapted codox to trust the :file when dealing with macros https://github.com/cljdoc/codox/blob/b29b16ae686e3400689bbdc93df57200b709443d/codox/src/codox/reader/clojurescript.clj#L61 - I’ll experiment with always trusting it. There might have been historical reasons not to always trust :file for cljs?

martinklepsch16:04:05

@lee I think the reason that it's done the way it is there is mostly that that's how it's been done in the first place

martinklepsch16:04:31

could very well be that we could rely on :file as provided by metadata in all cases

martinklepsch16:04:55

but would require some more testing, especially with protocol methods and this kind of stuff

lread16:04:01

do you have a set of goto projects you test against?

martinklepsch16:04:35

There's test-sources in that project which I usually use with the -main to test/debug stuff

martinklepsch16:04:03

clj -m codox.main clojure test-sources/

lread16:04:06

ok, good, thanks!

martinklepsch16:04:33

most of the time I combine this with heavy use of prn and stuff. arguably not the best debugging/testing experience — so very happy if you feel inspired to improve this in any way

lread16:04:00

do you think some unit tests would be useful for codox?

martinklepsch16:04:14

I made some initial work in that direction but didn't finish, let me see if I can commit that to a branch somewhere

lread16:04:17

oh… you are using kaocha on cljdoc. Cool, wanted to learn about that.

martinklepsch16:04:22

well actually there's not all that much 😄

martinklepsch16:04:54

yeah, kaocha is great!

martinklepsch16:04:38

What could be nice for codox is just a directory with source files and definition what the clj / cljs returns should return for analysing that directory

martinklepsch16:04:58

kaocha has some deep-diff stuff that could be pretty neat for this

lread16:04:12

I was going to try kaocha for rewrite-cljs, but got a bit nervous about current clojurescript support.

lread16:04:35

yeah, I guess more integration tests than unit tests.

martinklepsch16:04:30

yeah, cljs support is still a bit new unfortunately, I also recently played around with it for a work project but shadow-cljs' built-in testing stuff was sufficient at that point and just worked

lread16:04:21

I’m enjoying test support in figwheel main for dev right now and am using doo for ci.

martinklepsch16:04:16

Super cool you're working on rewrite-clj and rewrite-cljs btw, Arne (the author of Kaocha) is a huge fan of rewrite-clj* and always wanted to encourage some folks to contribute 😄

lread16:04:36

Cool! I’ve got a lot of todos on my list still, but am making good progress. I’ll probably start with an alpha to hopefully get feedback on some of my more, perhaps dubious, choices.

lread16:04:43

It’s funny, I started with trying to help out a bit on cljfmt which led me to rewrite-clj which led me to rewrite-cljs with led me to potemkin import-vars which led me to cljdoc. My travels have been interesting and very educational!

martinklepsch16:04:40

it's a multi-dimensional rabbit hole!