-
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.
Enforce use_hash flag for types of structured annotations in schema.t…
…hrift Summary: The schema.thrift representation constructed by thrift2ast has the [use_hash](https://fburl.com/code/e8a071lt) flag to convert any URIs or name identifiers to unique hashes. This prevents users from having to create & store an external mapping of identifiers to unique IDs in order to e.g. check for type equality. While the `Annotation` struct itself already hashed its underlying type, all annotation for a definition are also stored in a [map<string, Annotation>](https://www.internalfb.com/code/fbsource/[4ef64d09cf78d72d3bf29ae2b8c12251272133e2]/fbcode/thrift/lib/thrift/schema.thrift?lines=169), where the string is the URI/name of the type (again). This diff ensures that the `use_hash` flag is also correctly applied here. Reviewed By: iahs Differential Revision: D68911786 fbshipit-source-id: 2041e469956e9e8985fc192c6d41e88a35aceb08
- Loading branch information
1 parent
cebbb44
commit e661382
Showing
3 changed files
with
189 additions
and
30 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