<#15704 Add ability to extend a PEX lockfile witho...
# github-notifications
q
#15704 Add ability to extend a PEX lockfile without modifying existing entries Issue created by danxmoran Is your feature request related to a problem? Please describe. When I add a new
python_requirement
to my repo, I run
./pants generate-lockfiles
. In addition to adding a new entry for the requirement, the goal sometimes updates existing entries in my lockfile (i.e. to bump the patch version of a transitive dependency). Either before or during code review I'll typically end up manually reverting all the "unrelated" changes to keep my commit focused - this is easy to forget to do, so accidental upgrades sometimes creep through. The fact that
generate-lockfiles
might update existing entries in-place also prevents us from adding a CI check to assert that the lockfiles are up-to-date - ideally we'd run
generate-lockfiles
and fail if there was any diff, but we can't do that if there's a chance that unrelated changes might cause the check to fail. Describe the solution you'd like I'd like a new option on
generate-lockfiles
that tells the command to only add new entries to the lock, and not update existing ones. If it's not possible to add a new entry without updating an existing one, I'd like the command to fail with a description of the version conflict. pantsbuild/pants