Happy belated holidays y’all. I come bearing bugs,...
# general
m
Happy belated holidays y’all. I come bearing bugs, possibly maybe. Sorry. I was debugging a resource dependency issue and thankfully remembered having read about the
--no-process-execution-local-cleanup
flag. When running
./pants test …
that worked like a charm and all files nicely stuck around, waiting to be inspected. But originally the resource issue only showed when running
./pants run …
. In that case, Pants happily kept around the PEX files for finding Python and also the cached PEX file for the dependencies. But it did not keep around the PEX file with the local Python code, which kind of defeated the purpose of the flag. Admittedly, that is with Pants 2.7. I’m good now, thanks to good old trusted
print()
plus some choice
importlib.resources
invocations. But that does look like a bug to me.
🎁 1
h
Hello!
./pants run
is interesting because it uses
InteractiveProcess
to run in the foreground, rather than running in a sandbox like normal. I don't think
--no-process-execution-local-cleanup
will do anything for the final run. Instead, you should see folders in the build root like
.pants.d/tmplpd86t9k
. Pants will write the PEX and relevant files to that folder and set
PYTHONPATH
appropriately
👍 1
h
There is an option to preserve those interactive process dirs: https://github.com/pantsbuild/pants/pull/13427
./pants run --no-cleanup ...
But this is only available in 2.9.x
❤️ 1
m
Ooh, now I have an excuse to upgrade… Alas, I’m guessing that 2.9 isn’t stable as of yet, right?
h
It's getting close - we're about to release the third release candidate, usually the 4th or 5th become the stable release