Unlike a pex3 lock update, a pex3 lock sync can update any characteristic of an existing lock; not just individual top-level requirements. As such, changing options that affect accepted artifact types, like syncing from a --style universal lock that admits sdists to a --style universal --no-build that does not or changing --interpreter-constraints when syncing a lock that contains platform-specific artifacts, requires ignoring existing artifacts when selecting which locked resolve to sync using which target. Currently a full subset match is required which includes matching a compatible artifact and this leads to a failure to sync locks with multiple locked resolves and platform specific artifacts when settings are changed that shift the artifacts that are acceptable in the new lock. Instead of using a subset operation to select locked resolves, pex3 lock sync should use a softer match that ignores artifacts and just looks at requires_python and individual requirement environment markers when determining compatibility with a target.
Unlike a
pex3 lock update
, apex3 lock sync
can update any characteristic of an existing lock; not just individual top-level requirements. As such, changing options that affect accepted artifact types, like syncing from a--style universal
lock that admits sdists to a--style universal --no-build
that does not or changing--interpreter-constraints
when syncing a lock that contains platform-specific artifacts, requires ignoring existing artifacts when selecting which locked resolve to sync using which target. Currently a fullsubset
match is required which includes matching a compatible artifact and this leads to a failure to sync locks with multiple locked resolves and platform specific artifacts when settings are changed that shift the artifacts that are acceptable in the new lock. Instead of using a subset operation to select locked resolves,pex3 lock sync
should use a softer match that ignores artifacts and just looks atrequires_python
and individual requirement environment markers when determining compatibility with a target.