-
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
Make --modify_execution_info additive #16262
Make --modify_execution_info additive #16262
Conversation
I was told @meisterT might be happy to take a look maybe? |
I wonder whether this has the potential to break people? |
In practice, I'm not sure how likely it is to break people but technically, it is a breaking change. Do we think it's worth putting that behind an It would be great to have feedback from users to understand if this change would be incompatible for their use case 🙂 |
It may be wise to reach out to https://groups.google.com/g/bazel-discuss (and/or bazel-dev) to find out |
This would break a couple usages I know of, but not in a way that can't be recovered from with using the negation ability to remove stuff previously added. |
I started a thread in bazel-discuss to gather more feedback 👍 |
Just want to point it out, this flag is used internally across many projects. Just making this additive will likely break them. Adding an incompatible flag requires having a plan to migrate existing usages. I don't think we have the capacity to do that now. |
@coeuvre thanks for sharing. Could we not settle with a simple migration plan such as "activate it for the next major Bazel version"? |
The approach above could be taken with either:
The latter is simpler, but makes Bazel 6 migration harder, so I personally lean towards the former. Are there additional complexities I may not be aware of? |
7ef66ea
to
27395e2
Compare
Updated the PR to add an
@coeuvre to be honest, it doesn't feel like this should be a valid argument when discussing features for an open-source project. Providing a feature flag for the feature make it convenient for projects to keep the existing behavior. The existence of a process to eventually migrate out of it feels like a... second order constraint? Hard to put my finger on it exactly :-) That said, assuming there is a limited number of values used by the repo, there's a straightforward way to migrate existing usages in a way that doesn't change between non-additive (ie. current) and additive behavior: you can change any
to:
or (maybe more legible):
This example assumes that only three values are used across the repo. It can work for any number of values, though there is a point at which it might feel overwhelming. |
cc @susinmotion |
@bazelbuild/triage this stalled out. Can we get it looked at? |
I’d be happy to rebase this change or discuss alternative if people want to move forward with it. I still think it would be a natural improvement for Bazel. By the way, I realise the tone in my last comment wasn't the most appropriate, sorry about that 🙏 |
I am fine moving forward with current approach, i.e. add an incompatible flag and only make Please rebase the PR and I will take a proper review, thanks! |
Hi @sitaktif ! Could you please rebase the change for a proper view to finalize the review process? |
Calling --modify_execution_info multiple times used to result in the last version being used. With this change, options are amended additively. Fixes bazelbuild#13342
27395e2
to
185c4aa
Compare
|
||
} | ||
|
||
return create("", allExpressionsBuilder.build()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to pass the original input from the command line to the first argument because it is used for equality check. Maybe join eim.option()
with ,
? Please also assert the value of option()
for the merged modifier in the test cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks - updated 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I have imported the PR and made some changes on top of it:
- Renamed the incompatible flag to
--incompatible_modify_execution_info_additive
. - Instead of merging the modifiers, it now iterates though the list to avoid creating transient collection object. It matters because the code is called for reach action.
You can check the updated code here: https://bazel-review.git.corp.google.com/c/bazel/+/249650.
@bazel-io fork 7.2.0 |
Thanks for taking the time to review/improve this @coeuvre! 🙏 |
Calling --modify_execution_info multiple times used to result in the last version being used. With this change, options are amended additively if --incompatible_modify_execution_info_additive is set. Fixes bazelbuild#13342 Closes bazelbuild#16262. PiperOrigin-RevId: 631803759 Change-Id: I5386cbb0d02ef19a6b2ddf2f818cbab660b17c31
Calling --modify_execution_info multiple times used to result in the last version being used. With this change, options are amended additively if --incompatible_modify_execution_info_additive is set. Fixes bazelbuild#13342 Closes bazelbuild#16262. PiperOrigin-RevId: 631803759 Change-Id: I5386cbb0d02ef19a6b2ddf2f818cbab660b17c31
Calling --modify_execution_info multiple times used to result in the last version being used. With this change, options are amended additively if --incompatible_modify_execution_info_additive is set. Fixes #13342 Closes #16262. PiperOrigin-RevId: 631803759 Change-Id: I5386cbb0d02ef19a6b2ddf2f818cbab660b17c31 Closes #22288. Co-authored-by: Romain Chossart <rchossart@apple.com>
Calling --modify_execution_info multiple times used to result in the last version being used. With this change, options are amended additively if --incompatible_modify_execution_info_additive is set. Fixes bazelbuild#13342 Closes bazelbuild#16262. PiperOrigin-RevId: 631803759 Change-Id: I5386cbb0d02ef19a6b2ddf2f818cbab660b17c31
Calling --modify_execution_info multiple times used to result in the last version being used. With this change, options are amended additively.
Fixes #13342