gtristan commented on issue #1349:
URL: https://github.com/apache/buildstream/issues/1349#issuecomment-780475646
## Element excepting
In order to get consensus on what needs to be done for `--except` option
consistency, here is a breakdown of all of the commands with some thought into
whether it is a candidate for `--except`.
* `bst build`
When building the specified *targets*, it does not make sense to omit
elements which are required for a build, as that is just not really possible.
One could potentially `--except` build dependencies which would have been
included by `--deps all` but not by `--deps plan` (i.e. the `--except` option
would only be meaningful when running `bst build --deps all`).
* `bst show`
This command shows the `--deps` elements of the specified *targets*, here
`--except` makes sense and is implemented.
* `bst shell`
This command takes only one *target* and creates a shell, all of the
*target* dependencies are required and cannot be excepted.
I could envision a future where the user wants to stage sources or build
trees for the entire runtime dependency graph, in order to more easily use
debuggers - in such a future the user may want to be selective about which
sources are staged in the shell, and at that time it may make sense to
introduce a `--source-except` option for this.
Such a future idea however, should not be a blocker at this time.
* `bst source fetch`
Fetches sources for the `--deps` elements of the specified *targets*, here
`--except` makes sense and is implemented.
* `bst source push`
Pushes sources for the `--deps` elements of the specified *targets*, here
`--except` makes sense.
**Here the `--except` semantic is not implemented**
* `bst source track`
Tracks fresh versions of sources for the `--deps` elements of the
specified *targets*, here `--except` makes sense and is implemented.
* `bst source checkout`
Checkout sources for the the `--deps` elements of the specified *targets*,
here `--except` makes sense and is implemented.
* `bst workspace *`
Workspace commands never have a `--deps` argument, they operate on
explicit elements and do not manipulate dependency trees. There is no need for
`--except` in any of these.
* `bst artifact *`
Here we some ambiguity, especially given issue #1411.
* All artifact commands which have a `--deps` argument are potential
candidates for an `--except` argument
* Artifact commands currently support element names or artifact names
interchangeably (see #1411)
* When specifying artifact names on the command line, it is unclear how we
can support `--except`, possibly we would want to support
`${project-name}/${element-name}` syntax (without the cache key) for `--except`
values to apply against artifact dependencies.
## Tentative conclusion
To provide consistent support we should add the `--except` argument to `bst
source push`.
Regarding the `artifact` commands, we should block on figuring out how we
want to support `--except` arguments for dependencies of targets specified by
artifact name, this would be a new feature.
I think that this new feature of `--except` for artifact names is a decent
potential enhancement and can be added without breaking CLI API. I don't think
that this addition constitutes a blocker for BuildStream 2.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]