You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe this is actually an incorrect condition. In protobuf, required arguments are allowed to move to optional without being considered a breaking change. So in this condition, the client libraries could potentially remove the overload, which would constitute a breaking change.
A more accurate example would be if all arguments in the signature are optional, which unfortunately I don't believe would ever happen with the method_signature annotation.
I believe there is a mix of terms here. The word "required" likely refers to the [(google.api.field_behavior) = REQUIRED] field annotation, not the field being required in the protobuf sense (which does not exist in proto3, which is the syntax we use). Removing the REQUIRED annotation is not considered a breaking change.
I am also referring to the google.api.field_behavior sense. API fields can move from required to optional using that annotation. Therefore, something like that would break whatever method(s) were generated using method_signature
I agree with this point as, to both of your points, removing field_behavior = REQUIRED should not be a breaking change, which this example would create an opening for.
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I believe this is actually an incorrect condition. In protobuf,
requiredarguments are allowed to move tooptionalwithout being considered a breaking change. So in this condition, the client libraries could potentially remove the overload, which would constitute a breaking change.A more accurate example would be if all arguments in the signature are
optional, which unfortunately I don't believe would ever happen with themethod_signatureannotation.