-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transitive dependency support #11
base: master
Are you sure you want to change the base?
Conversation
Did you look at #5 discussion thread? There are several issues around implicit recursive behavior, which I want to avoid. Is this pull request different from what one can achieve using lein-sub and Leiningen profiles/aliases or lein-cascade? |
Hi Kumar. Yes, I did — it is about different things. There is no execution recursion in this case (I've misused it, addressing to the algorithm I use to determine proper build order). I didn't change In this pull request I'm only addressing build order. So, if you have two subprojects: A and B, and B have a dependency on A, then A will be built first, and only then B. I guess you can accomplish it with Currently, what we do is:
Or
Depending on how complex dependencies are. Well, once again — it is a very lightweight feature, I'm not addressing "set" of the sub-projects that will be built in any way, only the order in which they are built. |
I think I now understand what this PR is trying to do. Please let me know if I got it wrong. Since it (1) discovers the dependency between sub-projects, and (2) reorders their builds silently, there's some implicit magic (complected) going on. I appreciate the discovery part, which I'd rather like to be invoked with a command-line switch e.g. Please let me know what you think? The file |
Yep, you got it totally right! Now, thinking about — I think it is better to keep the build order as specified in the So I've added I've also added a paragraph to
I though it would be just natural, that you can override build order with $ lein sub clean -d
Building project [subtest/common-child v0.3.0-3-g0158fca]
Building project [subtest/child v0.3.0-3-g0158fca]
Building project [subtest/child2 v0.3.0-3-g0158fca]
Building project [subtest/child3 v0.3.0-3-g0158fca] Please let me know what you think about it! |
Kumar, any feedback on this? |
Sorry, was pulled away into other things. Will come back shortly on this. |
Cool! |
I have few observations:
If these observations are in conflict with the PR, fee free to create a clean new PR. Also, I will be happy to discuss with an open mind if you don't agree with any of my observations. |
Hi Kumar,
Neat plugin — thank you!
We are using it in a rather big project with transitive dependencies, and we though it would be nice if lein-sub would've resolved them out-of-the box in a more or less automatic manner.
I've adjusted
subtest
to represent this situation.So, dependency tree looks the following way:
and once you run
lein sub install
in\subtest
it will give you output like:Might you make dependency tree as:
It will go like:
And if you will make the dependency tree as:
Output would be:
So, as you see — it builds sub-projects in a recursion, unless finished or a cycle was encountered.