-
Notifications
You must be signed in to change notification settings - Fork 24k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use hasteModuleName for C++ Turbo Module enums #44631
Conversation
This pull request was exported from Phabricator. Differential Revision: D57602082 |
Base commit: 95de14d |
Summary: Changelog: [Internal][Breaking] Use hasteModuleName for C++ Turbo Module enums This is a follow up to facebook#44630 This changes the names of C++ Turbo Modules enums to use the `hasteModuleName`. Example: `NativeMyAbcModule.js` with this spec: ``` export enum EnumNone { NA, NB, } export interface Spec extends TurboModule { +getStrEnum: (arg: EnumNone) => EnumStr;t } export default (TurboModuleRegistry.get<Spec>('MyAbcModuleCxx'): ?Spec); ``` Before now we generated a base C++ struct with the name: ``` MyAbcModuleCxxEnumNone ^^^ ``` Now the generate name is: ``` NativeMyAbcModuleEnumNone ^^^^^^ ``` ## Changes: - No `Cxx` injected anymore - Ensure base struct is `Native` prefixed (all RN JS TM specs start with it) Differential Revision: D57602082
b0e7ae6
to
a36f0fb
Compare
This pull request was exported from Phabricator. Differential Revision: D57602082 |
Summary: Changelog: [Internal][Breaking] Use hasteModuleName for C++ Turbo Module enums This is a follow up to facebook#44630 This changes the names of C++ Turbo Modules enums to use the `hasteModuleName`. Example: `NativeMyAbcModule.js` with this spec: ``` export enum EnumNone { NA, NB, } export interface Spec extends TurboModule { +getStrEnum: (arg: EnumNone) => EnumStr;t } export default (TurboModuleRegistry.get<Spec>('MyAbcModuleCxx'): ?Spec); ``` Before now we generated a base C++ struct with the name: ``` MyAbcModuleCxxEnumNone ^^^ ``` Now the generate name is: ``` NativeMyAbcModuleEnumNone ^^^^^^ ``` ## Changes: - No `Cxx` injected anymore - Ensure base struct is `Native` prefixed (all RN JS TM specs start with it) Differential Revision: D57602082
a36f0fb
to
d5d4f17
Compare
This pull request was exported from Phabricator. Differential Revision: D57602082 |
Summary: Changelog: [Internal][Breaking] Use hasteModuleName for C++ Turbo Module enums This is a follow up to facebook#44630 This changes the names of C++ Turbo Modules enums to use the `hasteModuleName`. Example: `NativeMyAbcModule.js` with this spec: ``` export enum EnumNone { NA, NB, } export interface Spec extends TurboModule { +getStrEnum: (arg: EnumNone) => EnumStr;t } export default (TurboModuleRegistry.get<Spec>('MyAbcModuleCxx'): ?Spec); ``` Before now we generated a base C++ struct with the name: ``` MyAbcModuleCxxEnumNone ^^^ ``` Now the generate name is: ``` NativeMyAbcModuleEnumNone ^^^^^^ ``` ## Changes: - No `Cxx` injected anymore - Ensure base struct is `Native` prefixed (all RN JS TM specs start with it) Differential Revision: D57602082
d5d4f17
to
4c2d508
Compare
This pull request was exported from Phabricator. Differential Revision: D57602082 |
Summary: Changelog: [Internal][Breaking] Use hasteModuleName for C++ Turbo Module enums This is a follow up to facebook#44630 This changes the names of C++ Turbo Modules enums to use the `hasteModuleName`. Example: `NativeMyAbcModule.js` with this spec: ``` export enum EnumNone { NA, NB, } export interface Spec extends TurboModule { +getStrEnum: (arg: EnumNone) => EnumStr;t } export default (TurboModuleRegistry.get<Spec>('MyAbcModuleCxx'): ?Spec); ``` Before now we generated a base C++ struct with the name: ``` MyAbcModuleCxxEnumNone ^^^ ``` Now the generate name is: ``` NativeMyAbcModuleEnumNone ^^^^^^ ``` ## Changes: - No `Cxx` injected anymore - Ensure base struct is `Native` prefixed (all RN JS TM specs start with it) Differential Revision: D57602082
4c2d508
to
2ff1429
Compare
This pull request was exported from Phabricator. Differential Revision: D57602082 |
Summary: Changelog: [General][Breaking] Use hasteModuleName for C++ Turbo Module enums This is a follow up to facebook#44630 This changes the names of C++ Turbo Modules enums to use the `hasteModuleName`. Example: `NativeMyAbcModule.js` with this spec: ``` export enum EnumNone { NA, NB, } export interface Spec extends TurboModule { +getStrEnum: (arg: EnumNone) => EnumStr;t } export default (TurboModuleRegistry.get<Spec>('MyAbcModuleCxx'): ?Spec); ``` Before now we generated a base C++ struct with the name: ``` MyAbcModuleCxxEnumNone ^^^ ``` Now the generate name is: ``` NativeMyAbcModuleEnumNone ^^^^^^ ``` ## Changes: - No `Cxx` injected anymore - Ensure base struct is `Native` prefixed (all RN JS TM specs start with it) Reviewed By: cipolleschi Differential Revision: D57602082
2ff1429
to
95ec19e
Compare
This pull request was exported from Phabricator. Differential Revision: D57602082 |
Summary: Changelog: [General][Breaking] Use hasteModuleName for C++ Turbo Module enums This is a follow up to facebook#44630 This changes the names of C++ Turbo Modules enums to use the `hasteModuleName`. Example: `NativeMyAbcModule.js` with this spec: ``` export enum EnumNone { NA, NB, } export interface Spec extends TurboModule { +getStrEnum: (arg: EnumNone) => EnumStr;t } export default (TurboModuleRegistry.get<Spec>('MyAbcModuleCxx'): ?Spec); ``` Before now we generated a base C++ struct with the name: ``` MyAbcModuleCxxEnumNone ^^^ ``` Now the generate name is: ``` NativeMyAbcModuleEnumNone ^^^^^^ ``` ## Changes: - No `Cxx` injected anymore - Ensure base struct is `Native` prefixed (all RN JS TM specs start with it) Reviewed By: cipolleschi Differential Revision: D57602082
95ec19e
to
1f6a217
Compare
This pull request was exported from Phabricator. Differential Revision: D57602082 |
…44630) Summary: Changelog: [General][Breaking] Use hasteModuleName for C++ Turbo Module structs This changes the names of C++ Turbo Modules structs to use the `hasteModuleName`. Example: `NativeMyAbcModule.js` with this spec: ``` export type ValueStruct = { x: number, y: string, z: ObjectStruct, }; export interface Spec extends TurboModule { +getValueStruct: () => ValueStruct } export default (TurboModuleRegistry.get<Spec>('MyAbcModuleCxx'): ?Spec); ``` Before now we generated a base C++ struct with the name: ``` MyAbcModuleCxxValueStruct ^^^ ``` Now the generate name is: ``` NativeMyAbcModuleValueStruct ^^^^^^ ``` ## Changes: - No `Cxx` injected anymore - Ensure base struct is `Native` prefixed (all RN JS TM specs start with it) ## Why? - The `Cxx` extension is a temporary hint to react-native-codegen to enable extra capabilities and might disappear eventually - The C++ base struct name should be 'stable' - The name of the exported TM JS spec `TurboModuleRegistry.get<Spec>(...)` is abritrary, the hasteName is not - The name of the RN JS TM spec must start with `Native` which better guarantees a consistent naming scheme for these generated base class - The C++ Turbo Module base class has now the same prefix as the generated structs - `NativeMyAbcModule` for the example above Reviewed By: cipolleschi Differential Revision: D57599257
Summary: Changelog: [General][Breaking] Use hasteModuleName for C++ Turbo Module enums This is a follow up to facebook#44630 This changes the names of C++ Turbo Modules enums to use the `hasteModuleName`. Example: `NativeMyAbcModule.js` with this spec: ``` export enum EnumNone { NA, NB, } export interface Spec extends TurboModule { +getStrEnum: (arg: EnumNone) => EnumStr;t } export default (TurboModuleRegistry.get<Spec>('MyAbcModuleCxx'): ?Spec); ``` Before now we generated a base C++ struct with the name: ``` MyAbcModuleCxxEnumNone ^^^ ``` Now the generate name is: ``` NativeMyAbcModuleEnumNone ^^^^^^ ``` ## Changes: - No `Cxx` injected anymore - Ensure base struct is `Native` prefixed (all RN JS TM specs start with it) Reviewed By: cipolleschi Differential Revision: D57602082
Summary: Changelog: [General][Breaking] Use hasteModuleName for C++ Turbo Module enums This is a follow up to facebook#44630 This changes the names of C++ Turbo Modules enums to use the `hasteModuleName`. Example: `NativeMyAbcModule.js` with this spec: ``` export enum EnumNone { NA, NB, } export interface Spec extends TurboModule { +getStrEnum: (arg: EnumNone) => EnumStr;t } export default (TurboModuleRegistry.get<Spec>('MyAbcModuleCxx'): ?Spec); ``` Before now we generated a base C++ struct with the name: ``` MyAbcModuleCxxEnumNone ^^^ ``` Now the generate name is: ``` NativeMyAbcModuleEnumNone ^^^^^^ ``` ## Changes: - No `Cxx` injected anymore - Ensure base struct is `Native` prefixed (all RN JS TM specs start with it) Reviewed By: cipolleschi Differential Revision: D57602082
1f6a217
to
dee5cab
Compare
This pull request was exported from Phabricator. Differential Revision: D57602082 |
dee5cab
to
cd78c8d
Compare
This pull request was exported from Phabricator. Differential Revision: D57602082 |
This pull request has been merged in b7fc586. |
This pull request was successfully merged by @christophpurrer in b7fc586. When will my fix make it into a release? | How to file a pick request? |
Summary: Pull Request resolved: facebook#44631 Changelog: [General][Breaking] Use hasteModuleName for C++ Turbo Module enums This is a follow up to facebook#44630 This changes the names of C++ Turbo Modules enums to use the `hasteModuleName`. Example: `NativeMyAbcModule.js` with this spec: ``` export enum EnumNone { NA, NB, } export interface Spec extends TurboModule { +getStrEnum: (arg: EnumNone) => EnumStr;t } export default (TurboModuleRegistry.get<Spec>('MyAbcModuleCxx'): ?Spec); ``` Before now we generated a base C++ struct with the name: ``` MyAbcModuleCxxEnumNone ^^^ ``` Now the generate name is: ``` NativeMyAbcModuleEnumNone ^^^^^^ ``` ## Changes: - No `Cxx` injected anymore - Ensure base struct is `Native` prefixed (all RN JS TM specs start with it) Reviewed By: cipolleschi Differential Revision: D57602082 fbshipit-source-id: 9ebd68b8059dfbc6e2ec11065915cf049aa3cb0b
Summary:
Changelog:
[Internal][Breaking] Use hasteModuleName for C++ Turbo Module enums
This is a follow up to #44630
This changes the names of C++ Turbo Modules enums to use the
hasteModuleName
.Example:
NativeMyAbcModule.js
with this spec:Before now we generated a base C++ struct with the name:
Now the generate name is:
Changes:
Cxx
injected anymoreNative
prefixed (all RN JS TM specs start with it)Differential Revision: D57602082