polylith

https://polylith.gitbook.io/ and https://github.com/polyfy/polylith
wactbprot 2021-04-25T13:43:03.174600Z

Hi, I try to build some documentation using codox by clj -A:dev -X:codox in a polylith ws. The ws contains several components all created with poly create component name:example. The problem is that codox does not find any namespaces and emits an empty index.html. I tried several :source-paths configurations without success. Any advice would be greatly appreciated.

seancorfield 2021-04-25T19:12:10.175100Z

I don't see any docs on the Codox site for running it via the CLI. What is your :codox alias and how are you providing the Codox configuration?

wactbprot 2021-04-25T19:42:58.178900Z

Thank you for the answer. The alias is:

:codox {:source-paths ["components/stmem/src"
                        ;; and variations of that
                        ]

                    :extra-deps {codox/codox {:mvn/version "0.10.7"}}
                    :exec-fn codox.main/generate-docs
                    :exec-args {:language :clojure
                                :output-path "docs"}}
So the :source-pathseem to have the same structure as in youre command line example.

seancorfield 2021-04-25T19:50:00.179400Z

You need :source-paths inside the :exec-args map.

seancorfield 2021-04-25T19:50:44.180300Z

When you use -X, the command-line arguments are parsed and passed as part of the :exec-args hash map.

seancorfield 2021-04-25T19:51:38.181400Z

In your deps.edn, :source-paths is at the same level as :extra-deps etc and therefore is presented as an option for tools.deps.alpha (and it'll be ignored as unknown).

seancorfield 2021-04-25T19:52:11.181800Z

^ @wactbprot does that make sense?

wactbprot 2021-04-25T19:59:12.185200Z

Yes, makes sense if you explain it. Thank you very much. I find all the tools.deps stuff hard to understand.

seancorfield 2021-04-25T20:00:49.186600Z

It def. doesn't help that all of Codox's docs refer to Leiningen and so all of the config examples are about project.clj which inherently provides options to plugins.

wactbprot 2021-04-25T20:02:07.187600Z

Yes, but it's the same for most of the libs out there so far.

wactbprot 2021-04-25T20:02:58.188300Z

Thank you again!

seancorfield 2021-04-25T20:03:53.189100Z

Happy to help. We stopped using lein years ago at work. We switched to boot in 2015 and then to the CLI/`deps.edn` in 2018.