Behavior of --except argument is frustrating and confusing
Currently, given any recursive operation with an --except
option, the behavior is to scan the loaded pipeline and remove the except dependencies recursively.
The problem is once you have a fairly large project, like the GNOME modulesets for instance, there are many elements to choose from, when I run a command such as:
bst track --deps all --except core/meta-gnome-core.bst apps/meta-gnome-apps-tested.bst
I naturally expect that BuildStream will track all of the meta-gnome-apps-tested.bst
except for the elements in core/meta-gnome-core.bst
, these two virtual targets (stacks), basically represent what we release in terms of the apps layer and the core layer, however, apps/meta-gnome-apps-tested.bst
does not depend on core/meta-gnome-core.bst
.
This is impractical, any larger projects will run into this, and it's too tedious to examine the common dependencies of both virtual targets and supply --except
options for each intersection manually, this defeats the convenience purpose of the --except
option altogether.
To make matters worse, the error message the user receives in this case is No element named core/meta-gnome-core.bst
, leading the user to suspect a buildstream bug, since clearly there is an element with that name in their project.
Instead; BuildStream should actually load the --except
targets specified, and subtract the intersection from the pipeline targets - making the above example invocation just work.