Hey folks! I’m stuck trying to debug an issue rege...
# development
b
Hey folks! I’m stuck trying to debug an issue regenerating tool lockfiles inside the Pants repo. I’m running the following:
Copy code
./pants run build-support/bin/generate_builtin_lockfiles.py -- ruff
And this is the output I get:
Copy code
09:41:50.96 [INFO] Initialization options changed: reinitializing scheduler...
09:42:04.00 [INFO] Scheduler initialized.
09:42:09.77 [INFO] Completed: Building local_dists.pex
09:42:11.78 [INFO] Completed: Building 10 requirements for py_scripts.pex from the 3rdparty/python/user_reqs.lock resolve: PyYAML<7.0,>=6.0, ansicolors==1.1.8, packaging==21.3, pex==2.1.148, setuptools<64.0,>=63.1.0, toml==0.10.2,... (92 characters truncated)
[=== 00:24 Building native code... ===]
    Finished release [optimized + debuginfo] target(s) in 0.51s
fatal: not a git repository (or any of the parent directories): .git
Pantsd is being turned off since --concurrent is true.
/Users/krishnanchandra/Projects/pants/pants: line 75: /Users/krishnanchandra/.cache/pants/pants_dev_deps/0b7e97a56ac22450a009860fe1754052714ac135.venv/bin/python: No such file or directory
This seems to happen whether I enable the local cache or not, and I see that the error comes from here: https://github.com/pantsbuild/pants/blob/main/build-support/bin/generate_builtin_lockfiles.py#L269-L285 It looks like Pants is being invoked via subprocess inside the existing
pants run
process - I tried passing through
--no-local-cache
to this nested Pants process but that doesn’t seem to help either. Is there a better way to debug why this venv isn’t being created locally?
It appears that if I fully clear the contents of
~/.cache/pants/pants_dev_deps/
and start from scratch, a new venv is created but with a different hash compared to the output here:
Copy code
> ls /Users/krishnanchandra/.cache/pants/pants_dev_deps/

5709c1a054ca5899853199a432062f92bb7571eb.venv