-
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/scoped name of the type (again). This diff adds a third write path that indexes the annotations by `DefinitionKey`, which going forward is the canonical way of indexing definitions. The other write paths are retained for backwards compatibility until we can migrate all existing use-cases. #buildall Reviewed By: praihan, iahs Differential Revision: D69148104 fbshipit-source-id: 04396567b6851e7fd9f759555930657312b63840
- Loading branch information
1 parent
d8f9fc4
commit c5d4950
Showing
4 changed files
with
234 additions
and
33 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