incalculable-grass-76623
07/20/2022, 4:59 AMexperimental_run_shell_command
or experimental_shell_command
to run a custom command to output a file.
is there a way to
a. have experimental_run_shell_command
generate a "file() that I can have placed in the dist folder ? and have Pants know about it ?
or
b. have experimental_shell_command
place the file in the "dist" folder and be preserved - currently I am using a "archive" to grab the file from the process
Context - I am trying to debug the actual tool. and I am struggling to work out how to
1. run experimental_run_shell_command
or experimental_shell_command
and debug, and keep the file it produces. The "file" is the final output of a "package" process (that is my desired outcome)happy-kitchen-89482
07/21/2022, 11:38 PMexperimental_shell_command
uses Pants's code generation mechanism. So files it creates are placed in the sandbox of downstream processes that need source fileshappy-kitchen-89482
07/21/2022, 11:39 PM./pants export-codegen path/to/experimental_shell_command:target
happy-kitchen-89482
07/21/2022, 11:39 PMexport-codegen
is a goal that runs codegen on the specified targets and exports the output under dist/happy-kitchen-89482
07/21/2022, 11:40 PMhappy-kitchen-89482
07/21/2022, 11:40 PMincalculable-grass-76623
07/22/2022, 12:00 PMPants
have something similar to Please
's style of plz build //path/to:target --shell
incalculable-grass-76623
07/22/2022, 12:02 PMhappy-kitchen-89482
07/22/2022, 5:11 PM--no-process-cleanup
flag, that preserves the sandbox directories (and logs their paths) so you can inspect themhappy-kitchen-89482
07/22/2022, 5:11 PMexport-codegen
goal to get generated code out of the sandbox and into dist, as mentionedhappy-kitchen-89482
07/22/2022, 5:12 PM--shell
but it sounds like --no-process-cleanup
is ~similar