Element dependencies: Improve inline documentation to make it clear that deps of _Scope.BUILD don't return self - #2173
Open
nathanwilliams-ct wants to merge 1 commit into
Open
Conversation
nathanwilliams-ct
requested review from
BenjaminSchubert,
abderrahim,
cs-shadow,
gtristan and
juergbi
as code owners
August 12, 2026 15:22
Contributor
|
No, |
juergbi
reviewed
Aug 12, 2026
juergbi
left a comment
Contributor
There was a problem hiding this comment.
No, this is an intentional difference.
https://docs.buildstream.build/master/arch_dependency_model.html
Contributor
Author
|
ta both. I think it might still be valuable to add this documentation inline. |
nathanwilliams-ct
force-pushed
the
patch-1
branch
from
August 12, 2026 15:46
60bed43 to
33163ac
Compare
This makes it clear that _Scope.BUILD not yeilding element is intentional
nathanwilliams-ct
force-pushed
the
patch-1
branch
from
August 12, 2026 15:48
33163ac to
d229d2f
Compare
juergbi
approved these changes
Aug 15, 2026
juergbi
left a comment
Contributor
There was a problem hiding this comment.
LGTM, just a couple of nits.
| def visit(element, scope, visited): | ||
| if scope == _Scope.ALL: | ||
| def visit(element: Element, scope: _Scope, visited: tuple[BitMap,BitMap]) -> Generator[Element]: | ||
| if scope == _Scope.ALL: # The element, it's runtime and build dependencies |
Contributor
There was a problem hiding this comment.
Suggested change
| if scope == _Scope.ALL: # The element, it's runtime and build dependencies | |
| if scope == _Scope.ALL: # The element, its runtime and build dependencies |
|
|
||
| elif scope == _Scope.RUN: | ||
| # _Scope.BUILD intentionally excludes yielding the element itself. | ||
| elif scope == _Scope.RUN: # The element and it's runtime dependencies |
Contributor
There was a problem hiding this comment.
Suggested change
| elif scope == _Scope.RUN: # The element and it's runtime dependencies | |
| elif scope == _Scope.RUN: # The element and its runtime dependencies |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All other cases yield an element and a subset of it's dependencies recursively with visit...
I suspect the _Scope.BUILD case should do this too.