-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
codec: do not create Selfer for types which already have implemented …
…Selfer Update #142
- Loading branch information
Showing
1 changed file
with
10 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
5d64d76
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.
This introduces a regression if an embedded struct comes from another package:
The other package will have generated codecs by the time
xyz
is processed. The upper test will skip the generation forBar
such that the promoted self-codec funcs are used. These won't en/decodex
.5d64d76
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.
/cc @ugorji ^^
5d64d76
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.
Here is a quick-n-dirty proof of concept to detect promoted selfer funcs: kubernetes/kubernetes@383fd9b Unfortunately, with reflection we don't get this information.
5d64d76
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.
@sttts i responded to the original issue at #185