https://pantsbuild.org/ logo
#development
Title
# development
a

ancient-vegetable-10556

08/12/2021, 5:27 PM
@hundreds-father-404 Starting a thread on #12542 here
👍 1
I’ve changed the comment header format now, and I’m now getting to the consumption side of things. I currently still calculate the invalidation digest with the requirements strings and the interpreter constraints. That means the invalidation digest becomes incorrect if the requirements change OR [new] if the interpreter constraints in the file change. The lockfile is invalid for a given user if the invalidation digest is incorrect OR [new] if the interpreter constraints are not a subset of the interpreter constraints defined in the header. Is that a correct understanding?
h

hundreds-father-404

08/12/2021, 5:39 PM
I currently still calculate the invalidation digest with the requirements strings and the interpreter constraints.
That should change. The digest is now only for the requirement strings, and then interpreter constraints are a distinct entry in the header
not certain how exactly you want to serialize/deserialize those constarints, but we want to preserve what they were exactly and not lose information by hashing it That will allow at consumption-time reading them back in to
InterpreterConstraints
, then doing
lockfile_interpreter_constraints.is_compatible(context_ics)
(Completion of this task is blocked on merging #12448)
Perhaps add the
InterpreterConstraints
method as a prework PR? I was hoping to wait a little longer before merging #12448 because it's going to hurt performance for Pants devs and result in annoying warnings for you and me w/ our M1s that we override
[python-setup].interpreter_constraints
, until #12542 lands that is (Another option is to add
ignore
to the enum, which we may want to do anyways. Even if we end up deleting that before 2.7 stable goes out.)
a

ancient-vegetable-10556

08/12/2021, 6:00 PM
So I thought about removing the interpreter constraints from the digest, but I think we need to still keep the interpreter constraints that the file was generated with, in order to verify that the requirements list is valid for the specified interpreter constraints.
w

witty-crayon-22786

08/12/2021, 6:00 PM
landing with
ignore
seems reasonable. although it should obviously be discouraged, i don’t think that removing it before launch is even critical.
👍 1