bazelbuild / bazelbuild/bazel-skylib

Variation of `run_binary` to capture `stdout` and/or `stderr`

Open
#441 3 comments 3 reactions 0 assignees View on GitHub
P4 type: feature request
Dominant language
Starlark
Stars
444
Forks
202
PR merge metrics
No merged PRs in 30d

Description

The `run_binary` rule assumes that the output to be captured is written to file(s) by the binary either in implied or through `args` location(s). This does not completely replace the usage of [`genrule`](https://bazel.build/reference/be/general#genrule) because the use case of capturing output from a `stdout`-only binary is not supported. Is it possible to capture output in Bazel, or does this use case still have to be done through `genrule`?

Contributor guide

Open the contributing guide

Research direction

Start by reading the existing run_binary rule and comparing its output-file handling with Bazel's genrule behavior. Determine the expected semantics for capturing stdout and/or stderr, then document and verify a supported approach that covers the stdout-only use case without relying on genrule.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.