-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: `merge_into` is rather broken, with interesting behaviors including: - a structured field is recursively merged by default, but is simply overwritten if that field has a `cpp.Ref` annotation. Likewise, containers are concatenated by default and overwritten for ref fields. - an optional structured field that is not set in the destination is first ensured before merging, which means the source value will be merged into any custom defaults. However if the field has the `thrift.Box` annotation this does not happen and the source value is propagated unchanged. - unions are simply overwritten, instead of recursively merging in the case both source and destination have the same active member. This diff simply replaces the legacy reflection-based implementation with an always-on-reflection-based implementation while preserving these behaviors in order to avoid chaining migrations. Further improving the situation can be done in later diffs. Reviewed By: vitaut Differential Revision: D62467877 fbshipit-source-id: 8427503d686c02aa3f5f8a0088584e472ca8f080
- Loading branch information
1 parent
1d03bdb
commit 34960bd
Showing
3 changed files
with
86 additions
and
113 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
34 changes: 0 additions & 34 deletions
34
third-party/thrift/src/thrift/lib/cpp2/reflection/internal/merge-inl-pre.h
This file was deleted.
Oops, something went wrong.
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