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
Refactors output_field
to default to something that disambiguates on paramtrized fields
#16232
Refactors output_field
to default to something that disambiguates on paramtrized fields
#16232
Conversation
A cursory glance didn't show anywhere to test the packaging behaviour for regression (golang's |
…n parametrized fields [ci skip-rust] [ci skip-build-wheels]
1642771
to
0cd8573
Compare
f"{sanitize(k)}={sanitize(v)}" for k, v in self.parameters.items() | ||
) | ||
params = f"@@{key_value_strs}" | ||
params = f"@{sanitize(self.parameters_repr)}" |
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.
This is unrelated to the refactor, but it does make path_safe_spec
slightly easier to read
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.
Does it change the actual value? Or solely code factoring? If it changes behavior, it would be better as a dedicated change.
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.
Thanks!
f"{sanitize(k)}={sanitize(v)}" for k, v in self.parameters.items() | ||
) | ||
params = f"@@{key_value_strs}" | ||
params = f"@{sanitize(self.parameters_repr)}" |
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.
Does it change the actual value? Or solely code factoring? If it changes behavior, it would be better as a dedicated change.
It doesn't change the actual value, just how it's calculated. |
@@ -72,11 +72,14 @@ class OutputPathField(StringField, AsyncFieldMixin): | |||
def value_or_default(self, *, file_ending: str | None) -> str: |
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.
Re testing: this would be good to unit test in a new file package_test.py
. We shouldn't have done that for a long time, bad on us
Created #16247 as future work to address lack of unit tests |
…mbiguates on parametrized fields (pantsbuild#16232) (cherry picked from commit 28d7af5) # Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust]
…mbiguates on parametrized fields (pantsbuild#16232) # Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
…mbiguates on parametrized fields (pantsbuild#16232) # Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
Resolves #16189