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 lockfile generation for duplicate jvm_artifact targets with jar fields. (Cherry-pick of #15219) #15230

Merged
merged 1 commit into from
Apr 22, 2022

Conversation

stuhood
Copy link
Member

@stuhood stuhood commented Apr 22, 2022

#15218 demonstrates a fairly obscure issue where a mostly-duplicated jvm_artifact target which defined a jar field would find that the first few fields in an ArtifactRequirement were equal before attempting to compare a JvmArtifactJarSourceField field, which would fail.

Rather than sorting ArtifactRequirement instances, we can instead ensure that the input targets are sorted.

Fixes #15218.

…r` fields. (pantsbuild#15219)

pantsbuild#15218 demonstrates a fairly obscure issue where a mostly-duplicated `jvm_artifact` target which defined a `jar` field would find that the first few fields in an `ArtifactRequirement` were equal before attempting to compare a `JvmArtifactJarSourceField` field, which would fail.

Rather than sorting `ArtifactRequirement` instances, we can instead ensure that the input targets are sorted.

Fixes pantsbuild#15218.
# 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]
@stuhood stuhood merged commit 583f23f into pantsbuild:2.11.x Apr 22, 2022
@stuhood stuhood deleted the cherry-pick-15219-to-2.11.x branch April 22, 2022 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants