Bump React Native Codegen to 0.0.16#33749
Closed
cipolleschi wants to merge 5 commits into
Closed
Conversation
Summary: This Diff introduces some changes in the CodeGen to properly generate the types in the right folder. ## Issue The codegen on iOS defines the output folder once, before creating the generated code. When the code we have to generate is just a TurboModule (TM) or a Fabric Component (FC), this mechanism works properly. However, if a library has to generate both TM and FC, actually using the library type `all`, all the code is generated using the TurboModules' output folder. (**Note:** Android only works in this way) This generates invalid code because all the FC's `#import` directives assumes that the code is generated in the FC output path which, in this case, is not. ## Solution The adopted solution moves the responsibility to decide where the files has to be generated to the CodeGen step instead of in the preparatory phases. The two paths are precomputed in the `generate-artifacts.js` script (the entry point for the CodeGen) and they are passed to all the scripts that requires them. Once they reach the `RNCodegen.js` file, the generators creates the files and save them in the proper paths. ## Changelog [iOS][Changed] - CodeGen now supports the `"all"` library type. Differential Revision: D35820848 fbshipit-source-id: 9c3c8dec6e052342b6ae111ec292abd170c69b9c
Summary: This Diff splits the `generate-artifacts.js` script into: * `generate-artifacts-executor.js`: which contains the logic to generate the code for iOS. * `generate-artifacts.js`: which contains the argument parsing logic and invokes the executor. Finally, it introduces some tests. ## Changelog [iOS][Changed] - Refactor part of the codegen scripts and add tests. Differential Revision: D35846674 fbshipit-source-id: b33c6170d6363932bb944074fda063ca3cbe997f
Summary: This Diff splits the `generate-specs-cli.js` script into: * `generate-specs-cli-executor.js`: which contains the logic to generate the code for iOS. * `generate-specs-cli.js`: which contains the argument parsing logic and invokes the executor. Finally it introduces some tests. ## Changelog [iOS][Changed] - Refactor part of the codegen scripts and add tests. Differential Revision: https://www.internalfb.com/diff/D35892576?entry_point=27 fbshipit-source-id: 8d5c012e15bfc396ada0303e71894a42246ad203
facebook#33729) Summary: Pull Request resolved: facebook#33729 This PR addresses [this comment](https://www.internalfb.com/diff/D35820848?dst_version_fbid=496290878846487&transaction_fbid=355967423221044). It makes the CodeGen to the `outputDir` as base directory for the codegen. Finally, it updates the unit tests accordingly. ## Changelog [iOS][Changed] - use `outputDir` as base directory for the codegen and remove the possibility to customize the intermediate path. The generated code requires specific paths in the `#include` directive. Differential Revision: D35935282 fbshipit-source-id: f9e0d29d987fdb4f88b37d540bf6e195798c95db
Summary: Yet another bump of the Codegen to ship new features for RN 0.69 Changelog: [Internal] [Changed] - Bump React Native Codegen to 0.0.16 Reviewed By: cipolleschi Differential Revision: D36096803 fbshipit-source-id: 57ae9d463a39b92876477dc8c295685c3108b1a6
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D36096803 |
Base commit: a0a45dc |
Base commit: a0a45dc |
Collaborator
|
This pull request was successfully merged by @cortinico in b9bb30b. When will my fix make it into a release? | Upcoming Releases |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Yet another bump of the Codegen to ship new features for RN 0.69
Changelog:
[Internal] [Changed] - Bump React Native Codegen to 0.0.16
Reviewed By: cipolleschi
Differential Revision: D36096803