cool-easter-32542
03/14/2024, 2:12 AMshell_command and adhoc_tool target types to run processes in the workspace itself instead of an execution sandbox. Benefits include (1) better integration with external build tools which expect to be run in the workspace; and (2) better performance by avoiding copying large amounts of data into an execution sandbox.
The full design is in this design document.
Designs:
• Design A adds fields to the existing shell_command and adhoc_tool target types.
• Design B introduces a "workspace environment" similar to local environments to allow any target to run in the workspace.
I propose Design A since it is limited to the Shell backend and solves the motivating user stories mentioned in the design document without complicating other parts of Pants.
Design B goes too far in my view because it would allow any backend to be forced to run code in the workspace and would violate the assumption in most backends that their processes are invoked in an execution sandbox (whether local in Docker, or remote). This is a complication unnecessary to solve the motivating user stories.
pantsbuild/pants