mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
301e149f97
Summary: Instead of recreating the schema structure, the generator only needs to collect the list of types that it needs to generate for. So instead, let's just add each parsed type into a map using TypeId as the key. This means every inner types in the schema needs its own unique TypeId. This was a change from the previous commit where we didn't assign unique names to the types. Here's the reasoning: * In Java, any generated class needs to be in its own file. * If a NativeModule spec defines a few aliases, and or inner types (function args, return type shape, etc) that needs representation with a dedicated class, we need to track them as well for code generation. * This means, the schema format is no longer relevant for the code generation step, so let's produce a structure that's more efficient for code generation Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D23287818 fbshipit-source-id: 7caf4e95aeafe5c8ba336af290179b85bf87ad6d