Skip to content

Commit

Permalink
Switch module codegen to use yarn_workspace_binary. (#34015)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #34015

I noticed this was a very slow part of my build because each instance of the binary would run its own yarn install. Instead use the yarn_workspace approach to share a single yarn setup.
Changelog: [Internal]

Reviewed By: IanChilds

Differential Revision: D37178005

fbshipit-source-id: cba51e168c5a2f2ee6468acb8c144db4ad352d95
  • Loading branch information
d16r authored and facebook-github-bot committed Jun 15, 2022
1 parent d1321d8 commit dbe6fab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 29 deletions.
15 changes: 5 additions & 10 deletions packages/react-native-codegen/DEFS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,12 @@ def rn_codegen_cli():
],
visibility = ["PUBLIC"],
)
fb_native.sh_binary(
yarn_workspace_binary(
name = "generate_all_from_schema",
main = "src/cli/generators/generate-all.sh",
resources = native.glob(
[
"buck_tests/**/*.js",
"src/**/*.js",
],
) + [
"package.json",
"//xplat/js:setup_env",
main = "src/cli/generators/generate-all.js",
root = "//xplat/js:workspace",
deps = [
":yarn-workspace",
],
visibility = ["PUBLIC"],
)
Expand Down
19 changes: 0 additions & 19 deletions packages/react-native-codegen/src/cli/generators/generate-all.sh

This file was deleted.

0 comments on commit dbe6fab

Please sign in to comment.