-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
proto: make InternalMessageInfo functional #1129
Conversation
proto/deprecated.go
Outdated
func (*InternalMessageInfo) Merge(Message, Message) { panic("not implemented") } | ||
func (*InternalMessageInfo) Size(Message) int { panic("not implemented") } | ||
func (*InternalMessageInfo) Unmarshal(Message, []byte) error { panic("not implemented") } | ||
// Deprecated: Do not use. |
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 suggest adding more detailed info about the deprecation. Include such as:
- why this would be deprecated?
- when this would be removed from codebase?
- how to migrate if the user happens using this?
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.
Same as below.
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'd prefer not. I can mention that it's an internal type, but users really should not be looking at these.
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.
Unfortunate.
The InternalMessageInfo type only exists to implement the XXX methods on generated messages where those methods were only ever intended to be called by this module itself. Since v1.4.0, this module no longer relies on the XXX methods, so the InternalMessageInfo and its implementation is supposed to be dead code. Unfortunately, there are external usages that violate our compatibility agreement and either directly call the XXX methods or indirectly call it because some library type-asserts to the existence of these methods. This change adds minimal support for InternalMessageInfo by just calling out directly to the v2 implementation.
The InternalMessageInfo type only exists to implement the
XXX methods on generated messages where those methods were
only ever intended to be called by this module itself.
Since v1.4.0, this module no longer relies on the XXX methods,
so the InternalMessageInfo and its implementation is supposed
to be dead code. Unfortunately, there are external usages that
violate our compatibility agreement and either directly call
the XXX methods or indirectly call it because some library
type-asserts to the existence of these methods.
This change adds minimal support for InternalMessageInfo by
just calling out directly to the v2 implementation.