modern-leather-27612
01/25/2022, 7:36 PM~/.pex
and ~/.cache/pants
. A typical error trace is attached and any help would be much appreciated. This is a blocker for her picking up issues that touch on the repository (which coincidentally contains a new tool to validate package requirements across all our repositories that is about to go CI for all).
Also, to exclude any peculiarities due to our local Python package mirror or some such, I nuked the Pex and Pants caches on my work laptop and tried to bootstrap from scratch. The results are mixed: The good news is that I was able to bootstrap and Pants does run mypy, tests, etc. The bad news is that I cannot format or lint the code anymore since Pants just can’t find the lockfile for Black. I tried regenerating the main lockfiles etc to no avail. Part of me is ecstatic about never having to deal with Pylint again, but I fear that CI nor the CTO won’t let me get away with that. Again, any help would be much appreciated.
14:24:15.68 [ERROR] 1 Exception encountered:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/grr/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.DZStIS/install/lib/python3.9/site-packages/pants/backend/python/lint/black/lockfile.txt'
enough-analyst-54434
01/25/2022, 7:56 PMERROR: Could not find a version that satisfies the requirement pantsbuild.pants==2.8.0 (from versions: 0.0.17, 0.0.18, 0.0.20, 0.0.21, 0.0.22, 0.0.23, 0.0.24, 0.0.25, 0.0.26, 0.0.27, 0.0.28, 0.0.29, 0.0.30, 0.0.31, 0.0.32, 0.0.33, 0.0.34, 0.0.35, 0.0.36, 0.0.37, 0.0.38, 0.0.39, 0.0.40, 0.0.41, 0.0.42, 0.0.43, 0.0.44, 0.0.45, 0.0.46, 0.0.47, 0.0.48, 0.0.49, 0.0.50, 0.0.51, 0.0.52, 0.0.53, 0.0.54, 0.0.55, 0.0.56, 0.0.57, 0.0.58, 0.0.59, 0.0.60, 0.0.61, 0.0.62, 0.0.63, 0.0.64, 0.0.65, 0.0.66, 0.0.67, 0.0.68, 0.0.69, 0.0.70, 0.0.71, 0.0.72, 0.0.73, 0.0.74, 0.0.75, 0.0.76, 0.0.77, 0.0.79, 0.0.80, 0.0.81, 0.0.82, 1.0.0, 1.0.1, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.15.0, 1.16.0, 1.17.0, 1.18.0, 1.19.0, 1.20.0, 1.21.0, 1.22.0, 1.23.0, 1.24.0, 1.25.0, 1.26.0, 1.27.0, 1.28.0)
You'll notice that version list doesn't contain any 2.x versions at all (its also missing 1.29.x -> 1.30.x). That implies an sdist is being searched for since we do not (cannot actually) publish an sdist any longer due to the engine being in Rust and not having invested in getting an sdist build working.
So, they only way the wheels for all those versions fail to present themselves as satisfactory to Pex (Pip) is when the interpreter running Pip does not support any of the wheel tags. You can see the tags Pip thinks your interpreter supports by running:
/Users/sandra/.cache/pants/setup/bootstrap-Darwin-x86_64/2.8.0_py39/bin/pip debug -v
Could you do that and report back? It will be a very large list of tags.modern-leather-27612
01/26/2022, 2:48 AMhundreds-father-404
01/26/2022, 3:14 AMmodern-leather-27612
01/26/2022, 4:34 PMpip debug -v
on the two cached bootstrap directories still present on her machine. The one in the above log didn’t exist anymore. I’ve attached the output for both.
As to my issue with the lockfile for Black: I tried debugging that last night and, after adding -ldebug
to ./pants
, Pants decided to rebuild the build tool PEXens (PEXes?) and everything is back to working order. Since that means Pylint is nagging me again, I’m still deciding whether that’s progress or a regression. 🙄
Pylint aside, it’s a bit surprising that a debug flag triggers a rebuild. Do you have any insight as to what triggers that?
Thank you!happy-kitchen-89482
01/26/2022, 4:35 PMhappy-kitchen-89482
01/26/2022, 6:29 PMwitty-crayon-22786
01/26/2022, 6:29 PMmodern-leather-27612
01/26/2022, 8:53 PM-ldebug
restarting the scheduler is useful knowledge for situations like this. I’ve had the impression over the last few weeks that Pants wouldn’t pick up changes at times, so this seems an easy way to prod Pants. In fact, I’m tempted to add that to the troubleshooting section of the docs. Should I?witty-crayon-22786
01/26/2022, 8:56 PMhappy-kitchen-89482
01/26/2022, 10:29 PMmodern-leather-27612
01/26/2022, 10:58 PM-ldebug
is generally useful (it certainly has helped me before) and it also triggering a scheduler restart is a bit like a hidden superpower.