modern-leather-27612
12/27/2021, 8:01 PM--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.hundreds-father-404
12/27/2021, 8:06 PM./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
appropriatelyhappy-kitchen-89482
12/27/2021, 8:08 PMhappy-kitchen-89482
12/27/2021, 8:08 PM./pants run --no-cleanup ...
happy-kitchen-89482
12/27/2021, 8:10 PMmodern-leather-27612
12/27/2021, 8:55 PMhappy-kitchen-89482
12/27/2021, 9:58 PM