-
Notifications
You must be signed in to change notification settings - Fork 322
Open
Description
Is there a recommended way of creating a target from something like a cmd_args or a string, that only has a RunInfo, using the standard prelude?
I've tried using genrule for this like so:
genrule(
name = "run_os",
executable = True,
out = "dummy",
cmd = "touch dummy && $(exe :qemu) -cdrom $(location :os_image) -monitor stdio",
)But this has a couple of major downsides:
- It requires a dummy output (Should this be relaxed when
executable = True? It might not make sense for a gen rule to not generate any output though.) - It has a
DefaultInfo, which makes it get picked up by anybuck2 buildcommands with a pattern that matches this target
I've considered using a sh_binary instead, but I like the conciseness of defining everything in a single rule invocation, and I have other concerns mentioned in #664.
For now I'm going to write something like a runnable rule that will do what I want, but I was wondering if there was a better way that I missed.
Metadata
Metadata
Assignees
Labels
No labels