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

Document behavior of custom env and env_inherit attributes in Starlark rules #12758

Closed
brandjon opened this issue Dec 28, 2020 · 0 comments
Closed
Assignees

Comments

@brandjon
Copy link
Member

eb5cdcb added built-in env and env_inherit attributes that control the environment of an executable target in a blaze run invocation. It's still possible to define these attributes in custom rules. If that happens, and if they are of the right type (strict dict and string list), they will be interpreted specially, probably contrary to the rule author's intent.

The clearest thing to do would be to prohibit these attribute names in Starlark rules now that they have special meaning. But that's a breaking change and possibly overkill. We should at least document this unintended interaction.

+@katre as reviewer of that change. (label team-Starlark, but really team-BuildLanguage, which we haven't created yet.)

meisterT pushed a commit that referenced this issue Jan 12, 2021
This avoids unexpected behavior in the case of Skylark rules that happen to use the same attribute names.

Fixes #12758

PiperOrigin-RevId: 349587545
ulfjack pushed a commit to EngFlow/bazel that referenced this issue Mar 5, 2021
This avoids unexpected behavior in the case of Skylark rules that happen to use the same attribute names.

Fixes bazelbuild#12758

PiperOrigin-RevId: 349587545
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants