Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add arguments parameter to RunEnvironmentInfo #16430

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 8, 2022

  1. Add arguments parameter to RunEnvironmentInfo

    Executable Starlark rules can use the new `arguments` parameter on
    `RunEnvironmentInfo` to specify the arguments that Bazel should pass
    on the command line with `test` or `run`.
    
    If set to a non-`None` value, this parameter overrides the value of
    the `args` attribute that is implicitly defined for all rules. This
    allows Starlark rules to implement their own version of this attribute
    which isn't bound to its proprietary processing (data label expansion
    and tokenization).
    
    Along the way, this commit adds test coverage and documentation for the
    interplay between `RunEnvironmentInfo`'s `environment` and `--test_env`.
    
    The value of the `arguments` field of `RunEnvironmentInfo` is
    intentionally not exposed to Starlark yet: It is not clear how these
    arguments should be represented and whether rules relying on the magic
    `args` attribute should also provide this field.
    
    RELNOTES: Executable starlark rules can use the `arguments` parameter of
    `RunEnvironmentInfo` to specify their command-line arguments with `bazel
    run` and `bazel test`.
    fmeum committed Oct 8, 2022
    Configuration menu
    Copy the full SHA
    dbb91e4 View commit details
    Browse the repository at this point in the history