-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Lazy expansion of symbolic macros #23852
Comments
@meteorcloudy @meisterT This was slated for 8.0 but I think the timing's too tight. Certainly it's not making the cut date of Monday, but I was entertaining the idea of cherrypicking it in over the following weeks. Can you comment on the feasibility of that process vs backporting to a later 8.x? Is it the same amount of work but one inconveniences a release manager and the other doesn't? |
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 #23852 PiperOrigin-RevId: 682141401 Change-Id: Ic32e58ade1db01e1de53e747c43544a4327dbc5e
IMO, it mostly depends on how well isolated the code is and how risky it is that it would break other functionality. |
The difference between cherry-picking back to 8.0 vs 8.1 is just the timing -- cherry-picking to 8.0 post rc1 drags out further rc's. I'd like to avoid any non-regression fixes past rc1 to avoid slipping like past releases. Major releases already tend to slip a lot and it wears on release managers. |
Ok, thanks, that confirms that we won't want to try to fit laziness into 8.0. Once the other macro-related 8.0 blockers are resolved we'll implement laziness and see what it takes to backport into 8.x (x>0). |
Tracking bug for implementing lazy expansion of symbolic macros (the eager version of which was implemented in #19922).
Tentatively targeting Bazel 8.1.
@brandjon @susinmotion FYI
The text was updated successfully, but these errors were encountered: