Skip to content
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 defaulting of parameters in explicitly specified deps on parametrized targets for AsyncFieldMixin (Cherry-pick of #16176) #16179

Merged
merged 1 commit into from Jul 14, 2022

Conversation

stuhood
Copy link
Sponsor Member

@stuhood stuhood commented Jul 14, 2022

Although the tests for #14519 were reasonably good, they tested with StringField, rather than additionally with AsyncFieldMixin. The latter changes the definition of equality for the Field to include its address, meaning that comparing the Field instance itself will never match for Fields from different targets. That made #14519... not particularly useful in production.

This change fixes Field value comparisons to use field.value, references the newly opened #16175 (which is out of scope for now, given that it will likely be impacted by __defaults__ and would be much harder to cherry-pick), and adds an additional test.

Fixes #14519.

[ci skip-rust]
[ci skip-build-wheels]

…rize`d targets for AsyncFieldMixin (pantsbuild#16176)

Although the tests for pantsbuild#14519 were reasonably good, they tested with `StringField`, rather than additionally with `AsyncFieldMixin`. The latter changes the definition of equality for the `Field` to include its address, meaning that comparing the `Field` instance itself will never match for `Field`s from different targets. That made pantsbuild#14519... not particularly useful in production.

This change fixes `Field` value comparisons to use `field.value`, references the newly opened pantsbuild#16175 (which is out of scope for now, given that it will likely be impacted by `__defaults__` and would be much harder to cherry-pick), and adds an additional test.

Fixes pantsbuild#14519.

[ci skip-rust]
[ci skip-build-wheels]
@stuhood stuhood added the category:bugfix Bug fixes for released features label Jul 14, 2022
@stuhood stuhood requested review from benjyw and tdyas July 14, 2022 05:57
@stuhood stuhood merged commit 2734ae1 into pantsbuild:2.12.x Jul 14, 2022
@stuhood stuhood deleted the cherry-pick-16176-to-2.12.x branch July 14, 2022 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:bugfix Bug fixes for released features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants