cljdoc

https://cljdoc.org/ & https://github.com/cljdoc/cljdoc
lread 2019-04-07T17:00:08.097900Z

Oops, I just made my tests really carefully check that :path is being generated correctly by codox. I then I see in cljdoc that :path is stripped. 🤓 There is careful work in codox to handle the case where the :source-paths are not the same as the project (or git) :root-path. Am I correct in assuming these two are never different for cljdoc usage?

lread 2019-04-07T17:08:04.101600Z

I can see the benefit of keeping cljdoc/codox very similar to weavejester/codox so that merges back and forth are easy peasy. That said, what do you think of me deleting the cljdoc/codox writer/htlm.clj?

martinklepsch 2019-04-07T17:09:36.102900Z

by :path do you mean paths to the git repo and stuff like that? on cljdoc this is inferred based on the source repository

martinklepsch 2019-04-07T17:11:12.103300Z

If it's a burden, totally feel free to delete it. It hasn't bothered me so far but if it's in a single commit it will be easy to remove etc.

lread 2019-04-07T17:13:43.103500Z

I mean the :paths returned by cljdoc which are returned for each var with analysis. There is a :filetoo. The :path really just a resolved :file which handles the scenario where cljdoc config :source-paths differ from cljdoc config :root-path. I think maybe :path did not make sense for cljdoc because it might have never been different from :file… that and it is returned as a File… but that can easily be converted to a str.

martinklepsch 2019-04-07T17:16:21.103700Z

We always want relative paths to the root of the directory that's being analyzed and I think with :file that has been easiest. I vaguely remember :path being a thing but it didn't end up being useful for cljdoc

lread 2019-04-07T17:16:48.103900Z

It is becoming one now that we have unit tests and it refers to deps we don’t include in deps.edn.

martinklepsch 2019-04-07T17:17:10.104100Z

does the unit test tool try to load the namespace?

martinklepsch 2019-04-07T17:17:20.104300Z

oh, probably when in watch mode, right?

lread 2019-04-07T17:17:41.104500Z

Yeah. I’d have to configure kaocha to exclude it somehow.

lread 2019-04-07T17:17:50.104700Z

Easier to delete probably

martinklepsch 2019-04-07T17:17:53.104900Z

feel free to delete, sure

martinklepsch 2019-04-07T17:18:17.105100Z

ideally separate that in individual commits

lread 2019-04-07T17:19:01.105300Z

The other confusion I had was project.clj. Do you make use of that in cljdoc/codox?

martinklepsch 2019-04-07T17:20:12.105500Z

no, currently all we just rely on deps.edn

martinklepsch 2019-04-07T17:26:00.105700Z

Could be misunderstanding — it's probably more than a year ago that I really worked on this code 🙂

lread 2019-04-07T17:26:04.105900Z

The :path generated is relative to project root. I think I see why cljdoc saw no value in it though. I will adapt to make sure :file is relative to project root for cljs with my changes. This change might be valuable to weavejester, so I should be perserving that behaviour anyway.

lread 2019-04-07T17:26:44.106100Z

Yeah, I’m sorry I am talking as if you have intimate familiarity with what is probably a fading memory for you! 🙂

martinklepsch 2019-04-07T17:27:29.106300Z

No worries, happy to help if I can, just trying to manage expectations about my ability to do so 😄

lread 2019-04-07T17:27:49.106500Z

Ok to delete project.clj to avoid maintenance confusion?

👍 1
lread 2019-04-07T17:28:22.106700Z

Also, this is cool for me, I have only worked on lein projects to date, so I am learning about how things are handled without it.

lread 2019-04-07T17:28:50.106900Z

BTW, thanks for your time and patience, very much appreciated!

martinklepsch 2019-04-07T17:30:26.107200Z

clj is pretty neat and kaocha is well set up for it

lread 2019-04-07T17:32:21.107700Z

You have been most helpful!

lread 2019-04-07T17:40:07.107900Z

I am actually not sure how cljdoc/cljdoc brings in cljdoc/codox yet… but I can dig to understand… I think maybe I have monopolized enough of your day! 🙂

lread 2019-04-07T17:41:12.108100Z

What builds cljdoc/codox is my question I guess…

martinklepsch 2019-04-07T17:41:31.108300Z

@lee there's a bit of trickery there. in the analysis-runner we construct a new process that contains the codox stuff.

martinklepsch 2019-04-07T17:42:16.108500Z

@lee there's no build, it's added to the classpath via cljs git support

lread 2019-04-07T17:42:45.108700Z

oh ho… that is tricky!

lread 2019-04-07T17:43:52.108900Z

so if I write unit tests, I should probably write a circleci config to run them, eh?

martinklepsch 2019-04-07T17:44:25.109100Z

I'd say don't worry about that for now

martinklepsch 2019-04-07T17:45:14.109300Z

We can always tackle that later and with the rate of change that's happening it's fine to run stuff manually for now.

martinklepsch 2019-04-07T17:46:12.109500Z

If you want to do it that's cool too of course 😄

lread 2019-04-07T17:46:23.109700Z

Tell you what, I can include the ci config and let you decide if you want to use it.

lread 2019-04-07T17:46:37.109900Z

It just seems wrong not to…

martinklepsch 2019-04-07T17:57:24.110100Z

I'll happily use it, just don't feel like you have to 😄

lread 2019-04-07T17:59:31.110300Z

I’m obviously addicted to Clojure, might as well use my addiction for good.