https://pantsbuild.org/ logo
g

gentle-sugar-52379

10/02/2022, 7:01 PM
with the new
run_goal_use_sandbox
is there a way to make
restartable
usable too? atm it only works on
pex_binary
but thats slowing down the dev iterations massively.
b

bitter-ability-32190

10/02/2022, 7:42 PM
It'd need to be added, but I don't see why not 🤔
File an issue
h

happy-kitchen-89482

10/03/2022, 4:52 PM
@gentle-sugar-52379 what is causing the slowdown?
creating the sandbox?
b

bitter-ability-32190

10/03/2022, 5:41 PM
(Our most-run command has a 2-second overhead from end-to-end from Pants perspective (with the
main
swapped with
pass
and all imports not executed). I'd love to whittle that down)
h

happy-kitchen-89482

10/03/2022, 6:25 PM
When run in-source-tree or in-sandbox?
b

bitter-ability-32190

10/03/2022, 6:26 PM
well, in-source-tree still uses a sandbox, so yes 🙂
g

gentle-sugar-52379

10/04/2022, 4:10 AM
maybe im doaing something wrong. if i change a source file the whole pex gets recreated. in my case this leeds to a 1min waiting phase even after the slightest change. it's possible my mind is tricking me but i think this was not the case with 2.13.0. now im running 2.14r.0rc1
h

happy-kitchen-89482

10/04/2022, 5:28 AM
Are you running
./pants run path/to:main_target
or ./pants run
path/to/main.py
?
The former is equivalent to rebuilding the pex and then running it. The latter should be fast.
🙏 1
g

gentle-sugar-52379

10/04/2022, 5:58 AM
you are absolutely right! i was doing the first thing... another layer 8 error fixed 😄
🙌 1
b

bitter-ability-32190

10/04/2022, 11:31 AM
@gentle-sugar-52379 sorry for the headache. The long arc here of this change was to make things more intuitive and simple ("just run my file"), however that meant a bit of turning things on its head. The good news is once you're cozy, you can actually remove all the pex_binary targets solely for running a script (don't need to be packaged)
Also if you need the binary targets, you might consider an alternative layout, zipapp has the penalty of needing to be zipped
6 Views