-
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
Build failure caused by no-op starlark transition (friction between Starlark None and java null) #12888
Comments
Hi Stefan, Your issue isn't actually one I've seen before. But I know there's traditionally some friction between the java
And now with
I am wrapping up my last week with the Bazel team so I'm going to leave you with this potential workaround. If you're still finding it not to work, please re-ping this thread and someone else on the config team will re-triage. Overall, I'd like to keep the issue open since there continue to be issues with the |
Acknowledging @juliexxia 's last comment. There's a cluster of related issue that we need to ultimately address holistically. Hopefully the workaround is sufficient in the meantime. |
I think that I identified the interaction that causes this action conflict: Keeping track of the added defaults and removing them after the transition would be one way to fix this short-term. Depending on how Starlark build settings set on the CLI are treated, it could also be possible to always trim Starlark settings that take on their default values post-transition. |
@fmeum are you saying that caused this specific bug? Even accounting for the My hope is that the setting of I wrote some more about that to @sdtwigg - I could share in more detail if you like. Also check out #13580, which is a great step forward. It doesn't solve all problems but it's nudging us in the right direction. |
By convention, BuildOptions should not contain Starlark build settings that are set to their default values. However, if a Starlark transition has a build setting as an input, the value of that settings has to be added to the input BuildOptions temporarily so that it can be read. Fixes bazelbuild#12888.
By convention, BuildOptions should not contain Starlark build settings that are set to their default values. However, if a Starlark transition has a build setting as an input, the value of that settings has to be added to the input BuildOptions temporarily so that it can be read. Fixes bazelbuild#12888.
By convention, BuildOptions should not contain Starlark build settings that are set to their default values. However, if a Starlark transition has a build setting as an input, the value of that setting has to be added to the input BuildOptions temporarily so that it can be read by the transition. Before this commit, these build settings remained in the transition and could cause action conflicts. With this commit, all build settings that were added with their default values are iterated through and removed if they are still set to their defaults post-transition. Fixes bazelbuild#12888.
I actually think that the Rather, I think that I have prepared a PR, #13971, that trims all Starlark build settings that are set to their defaults from the output of a transition - it is the natural counterpart to |
FYI I know I owe you more responses on your recent input... |
Got it. #12888 (comment) makes a lot of sense. As you stated it it sounds like a no-brainer. I'll continue discussion on #13971. Re: no-op transitions specifically, would 11f2540 help? The intent was to make no-op transitions more user-friendly and performant: basically provide a simple UI early-return bypass. I don't know offhand if that code kicks in before the default setting changes you mention. I'd like to think so but I'm not sure. Nothing a quick review through the code couldn't clarify. :) |
@stefanbucur I'm especially interested in your feedback of my suggested workaround. If it works I'd close this issue and consider the issues @fmeum mentions as distinctly focused issues / PRs. |
By convention, BuildOptions should not contain Starlark build settings that are set to their default values. However, if a Starlark transition has a build setting as an input, the value of that setting has to be added to the input BuildOptions temporarily so that it can be read by the transition. Before this commit, if a build setting was an input but not an output of a transition, its default value remained in the BuildOptions and could cause action conflicts. With this commit, all build settings rather than only output build settings are trimmed post-transition if they are set to their default value. Fixes bazelbuild#12888.
By convention, BuildOptions should not contain Starlark build settings that are set to their default values. However, if a Starlark transition has a build setting as an input, the value of that setting has to be added to the input BuildOptions temporarily so that it can be read by the transition. Before this commit, if a build setting was an input but not an output of a transition, its default value remained in the BuildOptions and could cause action conflicts. With this commit, all build settings rather than only output build settings are trimmed post-transition if they are set to their default value. Fixes bazelbuild#12888.
Unfortunately that shortcut doesn't help: It applies at a point where defaults have already been added to |
By convention, BuildOptions should not contain Starlark build settings that are set to their default values. However, if a Starlark transition has a build setting as an input, the value of that setting has to be added to the input BuildOptions temporarily so that it can be read by the transition. Before this commit, if a build setting was an input but not an output of a transition, its default value remained in the BuildOptions and could cause action conflicts. With this commit, all build settings rather than only output build settings are trimmed post-transition if they are set to their default value. Fixes bazelbuild#12888.
By convention, BuildOptions should not contain Starlark build settings that are set to their default values. However, if a Starlark transition has a build setting as an input, the value of that setting has to be added to the input BuildOptions temporarily so that it can be read by the transition. Before this commit, if a build setting was an input but not an output of a transition, its default value remained in the BuildOptions and could cause action conflicts. With this commit, all build settings rather than only output build settings are trimmed post-transition if they are set to their default value. Fixes bazelbuild#12888.
Description of the problem / feature request:
Our fuzzing rules library implements a Starlark transition to provide compiler instrumentation options when building fuzz test executables. In order to reduce build size output, we would like to provide a "no-op" mode in which the transition is disabled through a bool config flag and the parent configuration is passed through unchanged.
However, when we attempt a build in this "no-op" transition configuration, we're hitting build failures of the form:
Running
bazel config
on the two configuration yields the following:The only differences in config seem to be related to input configs in the transition that we only read and not list in the output.
The transition is defined as follows:
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
What operating system are you running Bazel on?
Debian-based Linux.
What's the output of
bazel info release
?release 4.0.0
Have you found anything relevant by searching the web?
This issue seems to be loosely related to conversations in #11196.
The text was updated successfully, but these errors were encountered: