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. #15219

Merged
merged 4 commits into from
Apr 22, 2022

Conversation

stuhood
Copy link
Member

@stuhood stuhood commented Apr 21, 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.

stuhood added 4 commits April 21, 2022 15:23
# 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]
# 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]
# 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]
… `Target`s.

# 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 added this to the 2.10.x milestone Apr 21, 2022
@stuhood stuhood added the category:bugfix Bug fixes for released features label Apr 21, 2022
@stuhood stuhood merged commit a858a62 into pantsbuild:main Apr 22, 2022
@stuhood stuhood deleted the stuhood/jvm-artifact-sortable branch April 22, 2022 16:04
stuhood added a commit to stuhood/pants that referenced this pull request Apr 22, 2022
…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 added a commit to stuhood/pants that referenced this pull request Apr 22, 2022
…r` fields. (pantsbuild#15219)

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

Fixes pantsbuild#15218.

[ci skip-rust]

[ci skip-build-wheels]
stuhood added a commit that referenced this pull request Apr 22, 2022
…r` fields. (Cherry-pick of #15219) (#15230)

#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.
stuhood added a commit that referenced this pull request Apr 22, 2022
…r` fields. (Cherry-pick of #15219) (#15232)

#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.

[ci skip-rust]

[ci skip-build-wheels]
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.

Failure to generate a JVM lockfile if a jvm_artifact uses the jar field
2 participants