pkl icon indicating copy to clipboard operation
pkl copied to clipboard

Support for pkldoc generation via CLI

Open StefMa opened this issue 2 years ago • 4 comments

Seems like an known issue but not tracked as an issue yet 🙃

StefMa avatar Mar 03 '24 18:03 StefMa

The same problem exists for Java and Kotlin code generation. Gradle users can use the Gradle plugin.

odenix avatar Mar 05 '24 02:03 odenix

If I see it correctly, a module for doc gen already exist. The pkl-doc module.

I thought we can simply use this in the pkl-cli module 🤔 can we?

While checking this, I stumbled over the differences how the Gradle plugin declares dependencies compared to how the cli declare dependencies.

While the Gradle plugin uses the pkl-tools fatJar, the cli declares all its dependencies "normally".

~I don't know what the rationale behind this is, but I ask myself if the cli should also declare a dependency like the Gradle plugin or vice versa or... Keep everything like it is? Maybe someone can explain this?! 🙃~ nvmd. The cli can't depend on tools as tools depends on cli...

StefMa avatar Mar 20 '24 18:03 StefMa

If we support this, we'd probably publish these as standalone tools. For now, you can use pkl-tools as the "standalone CLI" (see comment here: https://github.com/apple/pkl/discussions/272#discussioncomment-8636479).

bioball avatar Mar 20 '24 18:03 bioball

I think the goal should be for tools to communicate with Pkl over the binary protocol. Then each tool can have its own, small native executable.

odenix avatar Mar 20 '24 19:03 odenix