hundreds-father-404
03/08/2022, 9:21 PMenough-analyst-54434
03/08/2022, 9:38 PMhundreds-father-404
03/08/2022, 9:45 PM[python].resolve_generate_lockfiles
to allow you to manually manage your user lockfiles
3. We continue to not require using [python].resolves
or [tool].lockfile
. Not sure tho if we should deprecate [python].requirement_constraints
Like 2.10 has a soft launch of "multiple resolves", 2.11 has a soft launch of Pex-generated lockfiles.enough-analyst-54434
03/08/2022, 10:12 PMhundreds-father-404
03/08/2022, 11:11 PM[python].lockfile_generator
⢠detect whether a lockfile is Pex JSON vs requirements.txt-style from Poetry
⢠strip JSON locks of Pants lockfile header (comments & JSON => boom)
⢠update pex.py
to use --lock
when appropriate
Would you have bandwidth to take on any of those this week? I can try my best to fill in the rest so that we can get this into 2.11.0rc0
this week@witty-crayon-22786 and I discussed there's also some work needed to stabilize
parametrize
, so rc0 this week is an aspiration and it's possible we slip to next weekbitter-ability-32190
03/08/2022, 11:27 PMhundreds-father-404
03/09/2022, 1:41 AMpex.py
. They're kind of code-golfy ā³ļø It would prob. be good to have a simple unit test for each.
I can do the 2 TODOs in lockfile.py
, along with anything you don't have time or interest in doing in pex.py
šenough-analyst-54434
03/09/2022, 2:00 AMpex.py
is highly dubious. Pex absolutely make no guarantees about the format not changing and has a version field in there to allow for it. I'd address that todo last or else spend some time thinking about a sane way to not parse an undocumented format.hundreds-father-404
03/09/2022, 2:09 AMThe 3rd TODO in pex.py is highly dubious.It was dubious to begin with...hm. The # of lines in a requirements.txt lockfile is not very helpful because
--hash
throws things off
Pex absolutely make no guarantees about the format not changing and has a version field in there to allow for it.Good point. Hm.
couldn't the header just add a line about the lock type and then always strip the headerYeah, but a key safety valve is
[python].invalid_lockfile_behavior
+ [python].resolves_generate_lockfiles
, which let you do manual lockfile generation. We cannot be certain a lockfile header is present in the lock. We probably want to drop that in Pants 2.12 or so, but until redesigned lockfiles are stable stable, this is a safety valve
Maybe tho we can assume if you're using a manual lockfile, you're not using Pex format...that makes sense. This all is convoluted š
Any concerns about header stripping perf when the operation behind it is a resolveAgreed
enough-analyst-54434
03/09/2022, 2:12 AM