This is a little goofy, but: I have some work that I'd like to keep private, but most that I'd like to open source. I'm wondering what it would be like to create two polylith repos, one for open source work and one for private work, where the latter points to components in the former. Any initial thoughts on how to achieve this, or whether maybe I'm barking up the wrong tree?
As Sean pointed out in a recent thread, Polylith is designed with applications as products in mind, not libraries
It is still possible, however
A few years ago I created https://github.com/imrekoszo/polylith-kaocha where the products are libraries
Namely, the kaocha-wrapper and test-runner projects defined here https://github.com/imrekoszo/polylith-kaocha/tree/master/projects
Referencing multiple libs in the same project from a repository like this might be a little unwieldy due to https://clojure.atlassian.net/browse/TDEPS-132
Got it, makes sense. Thanks!
I'd like to use the result of poly deps programatically. Is there a way to output the result as json rather than as a table? Or, barring that, how much work would it be to expose deps as part of the library API?
You have access to the whole https://cljdoc.org/d/polylith/clj-poly/0.3.32/api/polylith.clj.core.api.interface#workspace from the API. So a command like poly ws get:components:info:interface-deps will return:
{:src ["common" "path-finder" "text-table" "util" "validator"], :test ["file"]}
The same information is also available in the workspace structure that the API exposes. Then you need to assembly it to what you need (e.g. something similar to the output from the deps command).Awesome. Thanks!