forked from bazelbuild/bazel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prohibit calls to native.environment() in symbolic macros
environment_group() is a special non-rule callable which can only be invoked at top level in a BUILD file (there is no native.environment_group()) and which creates a special target that refers to environment rule targets via unresolved labels. This means that when we allow lazy macro expansion, if an environment target is declared in the scope of a macro, during constraint enforcement the environment group might or might not find the environment target depending on whether or not the symbolic macro happened to be expanded. By far the simplest solution is to prohibit calls to native.environment() in symbolic macros. Working towards bazelbuild#23852 PiperOrigin-RevId: 682141401 Change-Id: Ic32e58ade1db01e1de53e747c43544a4327dbc5e
- Loading branch information
1 parent
92f01d9
commit 5c82594
Showing
4 changed files
with
35 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters