Open tetromino opened 2 years ago
Related commit is https://github.com/bazelbuild/bazel/commit/d3bacfba3efef386bba80d7ff16c12c486165c4e, this is a great feature that the community can contribute when the Build API team currently doesn't have the resource.
I'm interested in contributing to this issue, so before I start working it, would you mind sparing your time explaining what the issue is about and pointing me to some resources to get started.
This is basically adding addtional APIs to ctx.actions so that it also supports run_bat
, run_ps
. This will allow users to write starlark rules that works on Windows without installing bash.
This is basically adding addtional APIs to ctx.actions so that it also supports
run_bat
,run_ps
. This will allow users to write starlark rules that works on Windows without installing bash.
Adding new arguments to run_shell
should be considered (not new call under ctx.actions
).
Description of the feature request:
For better bash-less Windows support,
ctx.actions.run_shell
could addcommand_bat
(with the same behavior as genrule'scmd_bat
) andcommand_ps
(with the same behavior as genrule'scmd_ps
).This would, in particular, considerably simplify skylib's Windows support, where currently we are forced to write and execute temporary .bat files on Windows (and attempt to deal with the ancient terror of argument quoting in .bat interpreter context - take a look at https://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts if you don't mind losing some points of sanity).
Pinging potentially interested parties: @brandjon @meteorcloudy @alexeagle