refined-addition-53644
01/19/2023, 6:14 PM~major.minor
, longer it takes to generate lockfiles. What’s the recommendation here?refined-addition-53644
01/19/2023, 6:16 PM~major.minor
to ~major.minor.patch
leads to never ending lockfile generation.refined-addition-53644
01/19/2023, 6:16 PMcurved-manchester-66006
01/19/2023, 7:04 PMenough-analyst-54434
01/19/2023, 7:13 PM>=3.7,<4
and is a huge range to solve for. When setting an IC though, beware: https://github.com/pantsbuild/pants/issues/17978
You currently must repeat yourself.enough-analyst-54434
01/19/2023, 7:16 PM[python] pip_version = "22.3"
to get generally faster resolvesenough-analyst-54434
01/19/2023, 7:17 PMcurved-manchester-66006
01/19/2023, 7:21 PMThe only narrowing that really helps speed is narrowing interpreter constraintsWith interpreter constraints versions
x.y.z
, would narrowing the z
be expected to speed it up meaningfully? (I know there are "fun" cases where pypi packages are picky about the z
)enough-analyst-54434
01/19/2023, 7:23 PM==3.10.*
should speed lock resolves with the caveat issue above, it's not that easy to set the IC!enough-analyst-54434
01/19/2023, 7:24 PMenough-analyst-54434
01/19/2023, 7:24 PMcurved-manchester-66006
01/19/2023, 7:25 PM// --- BEGIN PANTS LOCKFILE METADATA: DO NOT EDIT OR REMOVE ---
// {
// "version": 3,
// "valid_for_interpreter_constraints": [
// "CPython==3.10.*"
// ],
which matches what I expect (one 'version' which is 3.10)enough-analyst-54434
01/19/2023, 7:34 PMenough-analyst-54434
01/19/2023, 7:35 PMcurved-manchester-66006
01/19/2023, 8:09 PMpip install -r all-the-deps.txt
it takes about 2 minutes, while ./pants generate-lockfiles --resolve=default
(2.16.0.dev5+ and pip_version; single interpreter version) is still spinning at 15 minutes and I don't really expect it will ever finish based on when I tried something similar last. I know pants/pex is doing "more" in a sense (the lockfile should work for both macosx and linux, checking interpreter constraints) and it is fine it it takes somewhat longer to be stricter/better. But the difference in runtime seems excessive for what is naively a similar operation.
Is that magnitude of a difference in resolution typical, a nonviable comparison, or something that I should clean up into a ticket?
@refined-addition-53644 Sorry to hijack your thread!enough-analyst-54434
01/19/2023, 9:47 PMcurved-manchester-66006
01/19/2023, 10:04 PMgenerate-lockfiles
would still use a shared .cache/pants/named_caches/pex_root/pip_cache/
which was akin to .cache/pip
. My mental model is that in the case of both pip install
in a fresh virtualenv and ./pants generate-lockfiles
(today) the cpu burning resolve starts from scratch but some sdists/wheels/tarballs are cached from previous runs. In other words if I naively expect those operations to take the same order of magnitude time, the difference isn't explained by downloading artifacts afresh each time.
(#2044 looks like it would make the 2nd resolve much faster -- which is great! -- but I'd still need the 1st to finish.)enough-analyst-54434
01/19/2023, 11:03 PMenough-analyst-54434
01/20/2023, 4:56 PMcurved-manchester-66006
01/20/2023, 5:10 PMpex lock
was dramatically faster than pip install
¯\_(ツ)_/¯
I suspect I'm running into some pep resolver fun where multiple `-r`s or, the ordering of dependenies within files tickles the resolver's heuristics. But that's not a pants/pex problem yet!