Migrate codegen to shared build setup, remove package build pre-step from RNTester#47552
Closed
huntie wants to merge 2 commits into
Closed
Migrate codegen to shared build setup, remove package build pre-step from RNTester#47552huntie wants to merge 2 commits into
huntie wants to merge 2 commits into
Conversation
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D51465053 |
50cd30a to
dfb002c
Compare
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D51465053 |
dfb002c to
19860e6
Compare
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D51465053 |
19860e6 to
ef07d38
Compare
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D51465053 |
Summary: Update shared monorepo build script: - Refactor entry point discovery and file iteration - Add support for "exports" subpath patterns (skip considering as entry point with warning) This is required for the incoming migration of `react-native-codegen` to this build setup (D51465053). Changelog: [Internal] Differential Revision: D66121262
…from RNTester (facebook#47552) Summary: Pull Request resolved: facebook#47552 NOTE: Resubmission of D49370200. This simplifies the use of Codegen when creating dev builds of `rn-tester` in the monorepo. It now runs from source for this internal scenario, and this package is now built using the shared monorepo build setup. Changes: - Migrate `packages/react-native-codegen` to the shared `yarn build` setup. - Update package to use `"exports"` field and wrap entry point modules with `babel-register` (NOTE: This is only required for each entry point internally used in the monorepo). - Remove `BuildCodegenCLITask` task from Android build. - Remove Codegen `build.sh` call from iOS build, use `require.resolve` for `combine-js-to-schema-cli.js` entry point. Externally significant FYIs: - `react-native/codegen` is converted to use the `"exports"` field — it should export all `.js` files, as before. - `codegenPath` is now ignored and marked as deprecated on `ReactExtensions.kt`. NOTE: TypeScript auto-generation is not yet enabled on this package, since it uses CommonJS `module.exports` syntax (unsupported by `flow-api-translator`). Changelog: [Internal] Reviewed By: dmytrorykun Differential Revision: D51465053
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D51465053 |
ef07d38 to
38ff810
Compare
facebook-github-bot
pushed a commit
that referenced
this pull request
Dec 2, 2024
Summary: building RN tester with 0.77 rc-0 doesn't work now because of `java.io.IOException: No such file or directory` on line 48. `buildDirectory` is a Gradle property representing a file #47552 removes this file altogether so feel free to close if that one is the "right one" ## Changelog: [ANDROID] [FIXED] - fix IOException in `BuildCodegenCLITask` Pull Request resolved: #48008 Test Plan: After this change, building RN tester works. Reviewed By: cortinico Differential Revision: D66650038 Pulled By: robhogan fbshipit-source-id: 11cd83493fa118c6b79d11c9113228dd3971a803
robhogan
pushed a commit
that referenced
this pull request
Dec 2, 2024
Summary: building RN tester with 0.77 rc-0 doesn't work now because of `java.io.IOException: No such file or directory` on line 48. `buildDirectory` is a Gradle property representing a file #47552 removes this file altogether so feel free to close if that one is the "right one" ## Changelog: [ANDROID] [FIXED] - fix IOException in `BuildCodegenCLITask` Pull Request resolved: #48008 Test Plan: After this change, building RN tester works. Reviewed By: cortinico Differential Revision: D66650038 Pulled By: robhogan fbshipit-source-id: 11cd83493fa118c6b79d11c9113228dd3971a803
Collaborator
|
This PR is stale because it has been open for 180 days with no activity. It will be closed in 7 days unless you comment on it or remove the "Stale" label. |
Collaborator
|
This PR was closed because it has been stalled for 7 days with no activity. |
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:
NOTE: Resubmission of D49370200.
This simplifies the use of Codegen when creating dev builds of
rn-testerin the monorepo. It now runs from source for this internal scenario, and this package is now built using the shared monorepo build setup.Changes:
packages/react-native-codegento the sharedyarn buildsetup."exports"field and wrap entry point modules withbabel-register(NOTE: This is only required for each entry point internally used in the monorepo).BuildCodegenCLITasktask from Android build.build.shcall from iOS build, userequire.resolveforcombine-js-to-schema-cli.jsentry point.Externally significant FYIs:
react-native/codegenis converted to use the"exports"field — it should export all.jsfiles, as before.codegenPathis now ignored and marked as deprecated onReactExtensions.kt.NOTE: TypeScript auto-generation is not yet enabled on this package, since it uses CommonJS
module.exportssyntax (unsupported byflow-api-translator).Changelog: [Internal]
Reviewed By: dmytrorykun
Differential Revision: D51465053