Fork me on GitHub
#polylith
<
2023-09-23
>
jasonjckn00:09:09

Since polylith docs are so good, what would you advise for auto generating docs from interface code? this may be an obvious question just point me in the right direction, i’m sure i’ll figure it out quickly. I need something that works on-prem/data privacy.

seancorfield00:09:50

The overview docs are in GitBook (not generated) and the main poly tool docs are being migrated from GitBook to http://cljdoc.org -- an early partial version is here https://cljdoc.org/d/polylith/clj-poly/0.2.17-alpha/doc/migrate-workspace -- and you can run http://cljdoc.org locally, if you need to.

👍 1
tengstrand03:09:15

We have been working in the issue-318 branch for a while, moving the documentation back to the polylith GitHub repo. There is an early version https://cljdoc.org/d/polylith/clj-poly/0.2.18-SNAPSHOT/doc/readme that reflects the code in the https://github.com/polyfy/polylith/tree/issue-318 branch (it's was built a few days old ago, and doesn't reflect the latest https://github.com/polyfy/polylith/tree/issue-318/doc in the branch). This will at least give you an idea about how the new cljdoc based documentation will look like when released. We will also start to build SNAPSHOT https://github.com/polyfy/polylith/releases/tag/stable-build-snapshot of the stand-alone poly tool. The new build strategy is described https://cljdoc.org/d/polylith/clj-poly/0.2.18-SNAPSHOT/doc/ci/polylith-ci-setup. Note that this is work in progress and not officially released yet, but feel free to try it out and come with feedback if you like.

jasonjckn03:09:37

Thanks, Looks good, I need to see if cljdoc works on-prem, or what my options are

👍 1
tengstrand04:09:04

There are plans to add support for generating documentation, based on the code in a workspace, but that is quite far into the future. An idea I have to support others to build tools for e.g. generation of documentation, is to be able to pass in :code to the ws command, which would result in the workspace structure being populated with all def/defn/defmacro definitions in the interface, including all docstrings. Then it would be easier to build your own doc generator.

🙌 1
tengstrand03:09:15

We have been working in the issue-318 branch for a while, moving the documentation back to the polylith GitHub repo. There is an early version https://cljdoc.org/d/polylith/clj-poly/0.2.18-SNAPSHOT/doc/readme that reflects the code in the https://github.com/polyfy/polylith/tree/issue-318 branch (it's was built a few days old ago, and doesn't reflect the latest https://github.com/polyfy/polylith/tree/issue-318/doc in the branch). This will at least give you an idea about how the new cljdoc based documentation will look like when released. We will also start to build SNAPSHOT https://github.com/polyfy/polylith/releases/tag/stable-build-snapshot of the stand-alone poly tool. The new build strategy is described https://cljdoc.org/d/polylith/clj-poly/0.2.18-SNAPSHOT/doc/ci/polylith-ci-setup. Note that this is work in progress and not officially released yet, but feel free to try it out and come with feedback if you like.

jasonjckn03:09:02

I don't think it'd be hard to generate mermaid diagrams to show the component<->bases<->projects graph, there's an example at the bottom of the page here https://github.com/esuomi/muotti, might be something I do if I get spare cycles, but a bit low priority.

tengstrand04:09:41

This has already been done and posted here before in this channel by someone, but it was more than a year ago.

jasonjckn04:09:33

oh ok, i'll search

👍 1
tengstrand04:09:45

I'm a bit curious about what your use case is. What will it be used for?

jasonjckn04:09:54

I think it would just be easier to help new-hires get up to speed if they saw a graph like that

👍 1
jasonjckn04:09:07

it's probably not worth the effort / benefit trade-off, very low hanging fruit

jasonjckn04:09:39

It would just be part of our documentation

jasonjckn04:09:05

Our company is also mermaid-manic, they push it a lot

jumar08:09:28

Disclaimer: I'm a noob here and only started looking at Polylith (after observing it from distance for a couple of years). When I clone the polylith repo and run

poly shell
info
I get this output
polylith$ info
...
interface                 brick                      api  poly  polyx   dev  extended
  --------------------------------------------------   ----------------   -------------
  antq                      antq                       s--  s--    s--    s--     --
  api                       api                        s--  ---    ---    st-     --
...
  Error 101: Illegal dependency on namespace antq.ifc in lib.text-table.lib-table. Use antq.interface instead to fix the problem.
Is .ifc just an old naming convention that hasn't been updated yet?

tengstrand10:09:07

Hi @U06BE1L6T! Cool that you are interested in Polylith. The https://github.com/polyfy/polylith/issues/187 that adds support for for this will be included in the next release, 0.2.18 (or if you set the sha in the polylith alias to the latest commit from the https://github.com/polyfy/polylith/tree/issue-318 branch, that will also work) but you can use https://github.com/polyfy/polylith/releases/tag/stable-build-snapshot pre-release if you just want to play around with Polylith and use https://cljdoc.org/d/polylith/clj-poly/0.2.18-SNAPSHOT/doc/readme documentation (work in progress) together with it.

jumar16:09:29

I see, thanks!

👍 1