-
Notifications
You must be signed in to change notification settings - Fork 277
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
Add options to doc response #2770
Conversation
// All options that are present on the message. This is a super-set of | ||
// message_options and uses a dynamic representation so it can also | ||
// accommodate custom options with arbitrary types. | ||
repeated FieldLiteral options = 12; |
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.
It's weird that we have message_options
and then options
where options
is defined as "all options on the message". Do you instead want to deprecate message_options
and say that this supersedes it:?
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.
Yea we can do that. Should we also do the same with enum_options
, method_options
and service_options
as well?
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.
Yes. In all cases, the new repeated FieldLiteral options
field deprecates the old *_options
field.
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.
Perfect
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.
Added [deprecated = true]
to all *_options
fields
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.
I can completely remove *_options
fields from the messages in a follow up PR after the changes in core ships.
@@ -198,9 +198,14 @@ message Service { | |||
string file_path = 5; | |||
Location location = 6; | |||
repeated Method methods = 7; | |||
ServiceOptions service_options = 8; | |||
ServiceOptions service_options = 8 [deprecated = true]; |
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.
Can you move this to the bottom of the message definition, and add a comment "Use options instead."
...
repeated FieldLiteral options = 10;
// Use options instead.
ServiceOptions service_options = 8;
}
Also, is ServiceOptions
used elsewhere, or is this the only use? If not used elsewhere, also deprecate it:
message ServiceOptions {
option deprecated = true;
...
}
Apply this across all of the below. Sorry for the back and forth.
Part 2 of #2752.
Adding
FieldLiteral
toMessage
,Enum
,Service
,Method
andEnumValue
responses