lemon-oxygen-2929
02/03/2024, 12:58 PMgenerate-lockfiles for a python resolve, is there a way to tell pants to do only the smallest subset of necessary updates on top of the existing lockfile necessary to fulfill all the constraints?lemon-oxygen-2929
02/03/2024, 1:05 PMpants generate-lockfiles --resolve=default.
I think what I expected to see was only a new entry for "project_name": "tabulate" under "locked_requirements".
But what I saw instead were upgrades to a number of other requirements, and nothing about tabulate:
05:22:48.81 [INFO] Wrote lockfile for the resolve `default` to 3rdparty/py/default.lock
Lockfile diff: 3rdparty/py/default.lock [default]
== Upgraded dependencies ==
aiobotocore 2.11.1 --> 2.11.2
boto3-stubs 1.34.33 --> 1.34.34
botocore-stubs 1.34.33 --> 1.34.34
markupsafe 2.1.4 --> 2.1.5
pip 23.3.2 --> 24.0
pytest-docker 3.1.0 --> 3.1.1
types-pytz 2023.4.0.20240130 --> 2024.1.0.20240203
Digging into the lockfile, I realized that there were no changes for the new direct requirement on "tabulate", because the same version was already in the lockfile as a transitive dependency through a few other packages.lemon-oxygen-2929
02/03/2024, 1:07 PMhappy-kitchen-89482
02/03/2024, 2:19 PMhappy-kitchen-89482
02/03/2024, 2:22 PMlemon-oxygen-2929
02/04/2024, 1:52 PMhappy-kitchen-89482
02/04/2024, 4:14 PMhappy-kitchen-89482
02/04/2024, 4:15 PMlemon-oxygen-2929
02/04/2024, 4:33 PMrequirements.txt, and leave the lockfile unchanged.
I'm not sure if this is best practice, but it seemed reasonable to me, to avoid updating unrelated dependencies and risking that I break other targets, when what I'm doing should be a no-op.curved-manchester-66006
02/05/2024, 3:27 PMBy the way: In my specific case, where I was adding something as a direct requirement that already existed at the right version in the set of all requirements,I think that's fine in this case. Pants and Pex have slightly different accounting of "what was the input to the lockfile" so there is probably some corner case lurking in there... but Pants is currently pretty conservative about "out of sync" like problems