cool-easter-32542
01/27/2025, 4:52 PMrun_in_sandbox option to run_shell_command.
Describe alternatives you've considered
• Use run_shell_command. This doesn't work because it runs the command outside of the sandbox, and my python dev servers depend on pants-managed pip packages.
• Use run_shell_command after activating an exported python venv. This doesn't work because one of my python servers depends on a first-party library, and that library isn't included in the venv.
• Use shell_command. This target type is intended for build-step tasks like codegen, and expects things like output files (which my dev servers don't produce).
• Use pants run ./dev-server-1.py and pants run ./dev-server-2.py inside the mprocs config, and then run mprocs directly. This doesn't work because pants only allows one instance to run at a time.
• Compile to a PEX binary, then run directly. This doesn't allow hot-reloading.
• Use a separate dependency manager like uv. This is not ideal because it forces the use of a requirements.txt (to avoid code duplication). It also requires a manual install of first-party dependencies.
• Docker orchestration. This could potentially work, but it forgoes the use of mprocs (which is really nice). It also would require the maintenance of a separate dev image to enable hot-reloading (not sure this would even work).
pantsbuild/pants