Feature Request: Skip dependencies up to specified point in dependency chain
Summary
I'd love to be able to skip the first dependencies up until a user-specified point in the dependency chain when building a specific module. This would be very useful when the build fails, I fixed the corresponding issue and want to "continue" the build without having to rebuild the first dependencies.
How this would work
Let's say we add a new parameter --skip-deps <module>
or -s <module>
to the axii workspace upgrade
commands (as well as env
, update
and the other steps included). This would allow skipping all dependencies prior to <module>
when building and only upgrade the part of the flattened dependency chain from <module>
to the topmost module.
For example, lets imagine the following dependency graph (where -> means "depends on"):
A -> B1, A -> B2, B1 -> C1, B1 -> C2, C2 -> D
Flattened chain (=> represents build order like in axii w info
): D => C2 => C1 => B1 => B2 => A
axii workspace upgrade -s C1 -m A # will upgrade C1, B1, B2, A without re-upgrading D & C2
axii workspace build -s C2 -m B1 # will build C2, C1, B1 only
etc.
Why this would be useful
Referring to the above scenario, imagine C2 is something like ArmarXCore or VisionX which takes quite a while to build, even with ccache. Now imagine I did something wrong in C1, for example let's say I was on the wrong branch. After switching C1 to the right branch, I now have two options: Either rerunning my axii w ug -m A
command, which will take longer than necessary since its upgrading D and C2 (imagine ArmarXCore and VisionX!) again, or manually upgrading C1, then B1, then B2, then A, which will take longer than necessary because I have to upgrade every module by hand. With the new feature, I could simply continue the build by running
axii w ug -s C1 -m A
Why I have time to write this feature request
Because - you guessed it - I'm currently waiting for my build which is rebuilding modules it wouldn't need to ;)