Skip to content

Feature request: genrule with directory output / run_binary with command input #1062

@barryam3

Description

@barryam3

I'm interested in a rule that takes a shell command string as input like genrule but supports directories as outputs like run_binary. Would the maintainers of this library be receptive to a PR adding one?

My intuition would be to add a rule run_shell that shares a lot of the code of run_binary. But I can also imagine just adding a parameter to run_binary (incompatible with tool).

Yes, one can just use run_binary with sh_binary, but that requires to targets instead of one, plus a .sh file (or a third write_file target). If your script is more than a few lines, that's probably the better approach anyways, but it feels like a lot of boilerplate when I just want to do a simple transformation over an indeterminate number of files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    need: discussionWe have to do some design work in a meeting

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions