Closed bbsbb closed 5 years ago
Your first question is correct - the monolith link
subtask expects to be run inside the project that you want to generate checkout links for. The arguments to the subtask let you limit which set of links you want to generate.
As to your second question, you're correct that the other tasks don't need to be run in a subproject, though many of them do behave slightly differently (or assume some options) when you do. That is because they are largely higher-order tasks, rather than meant to affect a single project. The link
subtask could potentially be modified to accept targeting options, but that starts mixing in some functionality from other tasks.
I'll note that you can solve this by composing the each
and link
tasks together:
# link checkouts in a specific project:
$ lein monolith each :in my-project monolith link
# clear all checkout links:
$ lein monolith each monolith unlink
Thank you, I did not consider that composing in such a way would be valid. That's excellent and actually allows to replace our current workaround with a very slight Makefile tweak, so consider this closed!
Hey,
I would appreciate a quick help on the current behavior of the link command. While it was a breeze to script around and create a workflow around a monorepo with lein-monolith, I'm struggling slightly with understanding the implementation for link(and the reasons for it).
Thanks for the great job on the plugin!