-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
fix extendee_spec for transitive dependencies on potential extendees #48025
base: develop
Are you sure you want to change the base?
Conversation
99b0d3a
to
e4e02b3
Compare
Is this also the time and place to fix depends_on("python")
extends("python", when="@2:") if I read the code correctly just having a dependency is sufficient to extend something, completely ignoring the when condition of the extends directive. I find the current test a bit "deceiving" because you could interpret it as testing "conditionally extending a dependency" but in reality it tests "extending a conditional dependency". If that's not fixed in this PR, which is fine by me, then should we at least leave a comment noting the limitations of |
generally lgtm now 👍 could still use a test to cover the case when the dependency is there but it is not extended because the when condition doesn't apply |
dep | ||
for dep in self.spec.dependencies(deptype=("link", "run")) | ||
for d, when in self.extendees.values() | ||
if dep.satisfies(d) and self.spec.satisfies(when) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dep.satisfies(d)
is true by construction, but maybe you added this check defensively?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, added because I can imagine future changes that would make it not true by construction -- like if we allow separate concretization of run deps in the future. Agreed that it is not relevant for current specs.
Co-authored-by: Harmen Stoppels <[email protected]>
That's covered by |
Are we waiting on something to merge this? @haampie sounds like all concerns are resolved. |
fixes #48024
Only consider transitive dependencies in
extendee_spec()
.