Provide `args` for `_binary` rules in a provider
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 75
Description
### Description of the feature request:
[`_binary` rulres offer `args` and `env` attributes](https://bazel.build/reference/be/common-definitions#common-attributes-binaries). While `env` is available in the [`RunEnvironmentInfo` provider](https://bazel.build/rules/lib/providers/RunEnvironmentInfo), I couldn't find `args` in any provider.
### Which category does this issue belong to?
Core
### What underlying problem are you trying to solve with this feature?
We use test wrappers to run our tests in specific environments and we would like those wrappers to take both `args` and `env` of the wrapped targets into account correctly.
### Which operating system are you running Bazel on?
Linux
### What is the output of `bazel info release`?
8.3.1
### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.
_No response_
### What's the output of `git remote get-url origin; git rev-parse HEAD` ?
```text
```
### Have you found anything relevant by searching the web?
_No response_
### Any other information, logs, or outputs that you want to share?
_No response_
Contributor guide
Research direction
Start by tracing the _binary rule attributes and the RunEnvironmentInfo provider, focusing on how env is exposed and where wrapper consumers obtain it. Define how args should be represented alongside env, then add coverage for a provider-backed test wrapper showing that the wrapped target's arguments are preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100