-
Notifications
You must be signed in to change notification settings - Fork 613
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Metadata logic has an inefficiency where is will generate duplicate metadata for external types (types defined in another Thrift file). For example: ``` foo.thrift: struct MyFooStruct {} premadeMyFooStructType = <Some Metadata for MyFooStruct> bar.thrift: include foo.thrift struct MyBarStruct { 1: foo.MyFooStruct field; } premadeMyFooStructType = <Some Metadata for MyFooStruct> premadeMyBarStructType = <Some Metadata for MyBarStruct, referencing premadeMyFooStructType> ``` In the above example - you can see that we define `premadeMyFooStructType` twice - in the original package (foo.thrift) and in the package that imports foo.thrift - bar.thrift. To make things efficient we want this: ``` foo.thrift: struct MyFooStruct {} premadeMyFooStructType = <Some Metadata for MyFooStruct> bar.thrift: include foo.thrift struct MyBarStruct { 1: foo.MyFooStruct field; } premadeMyBarStructType = <Some Metadata for MyBarStruct, using foo.GetMetadataType("MyFooStruct")> ``` Reviewed By: leoleovich Differential Revision: D63490533 fbshipit-source-id: c2eb9c504b3ab732ba76d7416cfbafc568c0e5dc
- Loading branch information
1 parent
4d7e521
commit e322850
Showing
86 changed files
with
1,802 additions
and
98 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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.