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 lock updates for locks with sdist bystanders. #2325

Merged
merged 2 commits into from
Jan 14, 2024

Conversation

jsirois
Copy link
Member

@jsirois jsirois commented Jan 13, 2024

Previously, a pex3 lock update would fail whenever bystander projects
(those projects in the lock but not targeted for update via -p) had an
sdist primary artifact.

Fixes #2324

Previously, a `pex3 lock update` would fail whenever bystander projects
(those projects in the lock but not targeted for update via `-p`) had an
sdist primary artifact.

Fixes pex-tool#2324
@jsirois jsirois requested review from benjyw and huonw January 13, 2024 21:19
original=original_pin.as_requirement(), updated=updated_pin.as_requirement()
)
)
assert updated_requirement.artifact == locked_requirement.artifact, (
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cburroughs, although these asserts should never happen and thus not need good error messages, this one did trip which made your life harder debugging; so ... perhaps if there is a regression the new IT does not catch this helps some day.

@@ -148,7 +148,7 @@ def from_url(

url = attr.ib() # type: str
fingerprint = attr.ib() # type: Fingerprint
verified = attr.ib() # type: bool
verified = attr.ib(eq=False) # type: bool
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comment here explaining why this is necessary would be good (and you mentioned adding one in your response to #2324).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hrm, yeah. The single worst idea perpetuated by most languages is attaching eq to a type / not making it easy to detach it from a type. I think the explanation will make ~no sense there since it needs to refer to usages it should know nothing about. I'll re-work so the caller ~supplies their own eq.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, fixed. Now doing the right thing. Thanks for keeping me honest.

@@ -1,4 +1,4 @@
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

__version__ = "2.1.156"
__version__ = "2.1.157"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't you normally bump this (and edit the CHANGES) in a separate release prep PR? Is this a rebasing error, or deliberate?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is deliberate. I paused this time and asked myself if there was a good reason to keep these separate, and in the case of a single change release, I couldn't think of a good enough reason.

@jsirois jsirois merged commit 374ede8 into pex-tool:main Jan 14, 2024
26 checks passed
@jsirois jsirois deleted the issues/2324 branch January 14, 2024 00:57
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.

update on lock with acryl-datahub fails with cryptic error message
2 participants