-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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 structs #44630
Conversation
This pull request was exported from Phabricator. Differential Revision: D57599257 |
Summary: Changelog: [Internal][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 Differential Revision: D57599257
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
Base commit: 95de14d |
Summary: Changelog: [Internal][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 Differential Revision: D57599257
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
Summary: Changelog: [Internal][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 Differential Revision: D57599257
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
…44630) Summary: Changelog: [Internal][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 Differential Revision: D57599257
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
Summary: Changelog: [Internal][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 Differential Revision: D57599257
3054f47
to
cfc6d5d
Compare
This pull request was exported from Phabricator. Differential Revision: D57599257 |
Summary: Changelog: [Internal][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 Differential Revision: D57599257
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
Summary: Changelog: [Internal][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 Differential Revision: D57599257
cfc6d5d
to
90d4f30
Compare
This pull request was exported from Phabricator. Differential Revision: D57599257 |
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
90d4f30
to
22d0762
Compare
This pull request was exported from Phabricator. Differential Revision: D57599257 |
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
22d0762
to
c880820
Compare
This pull request was exported from Phabricator. Differential Revision: D57599257 |
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 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
c880820
to
c4b0f84
Compare
This pull request was exported from Phabricator. Differential Revision: D57599257 |
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
c4b0f84
to
7698c38
Compare
This pull request was exported from Phabricator. Differential Revision: D57599257 |
…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
7698c38
to
b4a225b
Compare
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
This pull request was exported from Phabricator. Differential Revision: D57599257 |
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
b4a225b
to
e7c0553
Compare
This pull request was exported from Phabricator. Differential Revision: D57599257 |
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
…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
This pull request has been merged in 07261d0. |
This pull request was successfully merged by @christophpurrer in 07261d0. When will my fix make it into a release? | How to file a pick request? |
Summary: Pull Request resolved: #44631 Changelog: [General][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: ``` 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: Pull Request resolved: facebook#44630 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 fbshipit-source-id: 4fafe6c7e920737fa766bd7e8e68e521f608e775
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 structs
This changes the names of C++ Turbo Modules structs 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)Why?
Cxx
extension is a temporary hint to react-native-codegen to enable extra capabilities and might disappear eventuallyTurboModuleRegistry.get<Spec>(...)
is abritrary, the hasteName is notNative
which better guarantees a consistent naming scheme for these generated base classNativeMyAbcModule
for the example aboveDifferential Revision: D57599257