Skip to content

Add scripts to debug the rn-tester project easier#33386

Closed
ken0nek wants to merge 5 commits into
facebook:mainfrom
ken0nek:work/rn-tester_Makefile
Closed

Add scripts to debug the rn-tester project easier#33386
ken0nek wants to merge 5 commits into
facebook:mainfrom
ken0nek:work/rn-tester_Makefile

Conversation

@ken0nek
Copy link
Copy Markdown
Contributor

@ken0nek ken0nek commented Mar 5, 2022

Summary

This pull request simplifies and makes it easy to debug the rn-tester project and switch configurations within the project.

  • yarn start : Start packager
  • yarn install-android-jsc : Build with installJscDebug.
  • yarn install-android-hermes : Build with installHermesDebug.
  • yarn clean-android : Clean up the Android build files.
  • yarn setup-ios-jsc : Install dependencies to use JSC.
  • yarn setup-ios-hermes : Install dependencies to use Hermes.
  • yarn clean-ios : Clean up the build files and Pods.

Changelog

[General] [Changed] - Add scripts to debug rn-tester easier

Test Plan

Log

// packages/rn-tester

$ yarn setup-ios-jsc

yarn run v1.22.17
$ yarn install && bundle install && bundle exec pod install
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
success Already up-to-date.
Using rexml 3.2.5
Using CFPropertyList 3.0.5
Using concurrent-ruby 1.1.9
Using i18n 1.9.1
Using minitest 5.15.0
Using tzinfo 2.0.4
Using zeitwerk 2.5.4
Using activesupport 6.1.4.4
Using public_suffix 4.0.6
Using addressable 2.8.0
Using httpclient 2.8.3
Using json 2.6.1
Using algoliasearch 1.27.5
Using atomos 0.1.3
Using bundler 2.1.4
Using claide 1.1.0
Using fuzzy_match 2.0.4
Using nap 1.1.0
Using netrc 0.11.0
Using ffi 1.15.5
Using ethon 0.15.0
Using typhoeus 1.4.0
Using cocoapods-core 1.11.2
Using cocoapods-deintegrate 1.0.5
Using cocoapods-downloader 1.5.1
Using cocoapods-plugins 1.0.0
Using cocoapods-search 1.0.1
Using cocoapods-trunk 1.6.0
Using cocoapods-try 1.2.0
Using colored2 3.1.2
Using escape 0.0.4
Using fourflusher 2.3.1
Using gh_inspector 1.1.3
Using molinillo 0.8.0
Using ruby-macho 2.5.1
Using nanaimo 0.3.0
Using xcodeproj 1.21.0
Using cocoapods 1.11.2
Bundle complete! 2 Gemfile dependencies, 38 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Building RNTester with Fabric enabled.
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
[Codegen] generating an empty RCTThirdPartyFabricComponentsProvider
Building RNTester with Fabric enabled.
[Codegen] Skipping React-Codegen podspec generation.
[Codegen] generating an empty RCTThirdPartyFabricComponentsProvider
Building RNTester with Fabric enabled.
[Codegen] Skipping React-Codegen podspec generation.
[Codegen] generating an empty RCTThirdPartyFabricComponentsProvider
Analyzing dependencies
[Codegen] Found FBReactNativeSpec
[Codegen] Found rncore
[Codegen] Found ScreenshotmanagerSpec
Downloading dependencies
Installing FBLazyVector 1000.0.0
Installing FBReactNativeSpec 1000.0.0
Installing RCTRequired 1000.0.0
Installing RCTTypeSafety 1000.0.0
Installing React 1000.0.0
Installing React-Core 1000.0.0
Installing React-CoreModules 1000.0.0
Installing React-Fabric 1000.0.0
Installing React-RCTActionSheet 1000.0.0
Installing React-RCTAnimation 1000.0.0
Installing React-RCTBlob 1000.0.0
Installing React-RCTFabric 1000.0.0
Installing React-RCTImage 1000.0.0
Installing React-RCTLinking 1000.0.0
Installing React-RCTNetwork 1000.0.0
Installing React-RCTPushNotification 1000.0.0
Installing React-RCTSettings 1000.0.0
Installing React-RCTTest 1000.0.0
Installing React-RCTText 1000.0.0
Installing React-RCTVibration 1000.0.0
Installing React-callinvoker 1000.0.0
Installing React-cxxreact 1000.0.0
Installing React-graphics 1000.0.0
Installing React-jsi 1000.0.0
Installing React-jsiexecutor 1000.0.0
Installing React-jsinspector 1000.0.0
Installing React-logger 1000.0.0
Installing React-perflogger 1000.0.0
Installing React-rncore 1000.0.0
Installing React-runtimeexecutor 1000.0.0
Installing ReactCommon 1000.0.0
Installing Yoga 1.14.0
Generating Pods project
[DEDUCTED]/react-native/packages/rn-tester/Pods/Target Support Files/Pods-RNTester/Pods-RNTester.release.xcconfig
[DEDUCTED]/react-native/packages/rn-tester/Pods/Target Support Files/Pods-RNTester/Pods-RNTester.debug.xcconfig
[DEDUCTED]/react-native/packages/rn-tester/Pods/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests.release.xcconfig
[DEDUCTED]/react-native/packages/rn-tester/Pods/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests.debug.xcconfig
[DEDUCTED]/react-native/packages/rn-tester/Pods/Target Support Files/Pods-RNTesterIntegrationTests/Pods-RNTesterIntegrationTests.release.xcconfig
[DEDUCTED]/react-native/packages/rn-tester/Pods/Target Support Files/Pods-RNTesterIntegrationTests/Pods-RNTesterIntegrationTests.debug.xcconfig
React-Core
Integrating client project
Pod installation complete! There are 65 dependencies from the Podfile and 53 total pods installed.
✨  Done in 8.68s.

@ken0nek ken0nek requested a review from hramos as a code owner March 5, 2022 02:57
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 5, 2022
Comment thread packages/rn-tester/README.md Outdated
Copy link
Copy Markdown
Contributor Author

@ken0nek ken0nek Mar 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the line number of fabric configuration.

@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Mar 5, 2022
@ken0nek
Copy link
Copy Markdown
Contributor Author

ken0nek commented Mar 5, 2022

It seems that CI on main (87ad1e8) is failing.

@react-native-bot react-native-bot added the Platform: iOS iOS applications. label Mar 5, 2022
@analysis-bot
Copy link
Copy Markdown

analysis-bot commented Mar 5, 2022

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: 1804951
Branch: main

@cortinico
Copy link
Copy Markdown
Contributor

This pull request simplifies and makes it easy to debug the rn-tester project and switch configurations within the project.

Hi @ken0nek

Thanks for your contribution. I don't think we're going to merge this as it is. This goes against the nature of the project itself. We're using yarn, cocoapods and Gradle to build the project.

The commands you added could be instead just npm scripts, and we don't need a makefile at all.

@ken0nek
Copy link
Copy Markdown
Contributor Author

ken0nek commented Mar 5, 2022

Hi @ken0nek

Thanks for your contribution. I don't think we're going to merge this as it is. This goes against the nature of the project itself. We're using yarn, cocoapods and Gradle to build the project.

The commands you added could be instead just npm scripts, and we don't need a makefile at all.

Thank you for the comment! I will try moving commands into npm scripts 👍

@ken0nek ken0nek changed the title Create Makefile for the rn-tester project (iOS) Add scripts to debug the rn-tester project easier (iOS) Mar 5, 2022
@ken0nek ken0nek force-pushed the work/rn-tester_Makefile branch from 73e32f7 to 83b19a9 Compare March 5, 2022 20:58
@ken0nek
Copy link
Copy Markdown
Contributor Author

ken0nek commented Mar 5, 2022

@cortinico Updated. Please check when you have a chance.

@ken0nek ken0nek force-pushed the work/rn-tester_Makefile branch from 83b19a9 to ad6a67a Compare March 5, 2022 21:24
Comment thread packages/rn-tester/package.json Outdated
@ken0nek ken0nek changed the title Add scripts to debug the rn-tester project easier (iOS) Add scripts to debug the rn-tester project easier Mar 7, 2022
@ken0nek ken0nek force-pushed the work/rn-tester_Makefile branch from a9a57eb to 5979493 Compare March 7, 2022 20:16
@ken0nek ken0nek requested a review from cortinico March 8, 2022 01:08
Comment thread packages/rn-tester/package.json Outdated
Comment thread packages/rn-tester/package.json
@ken0nek ken0nek force-pushed the work/rn-tester_Makefile branch from 87dc3e9 to 596f48e Compare March 10, 2022 18:47
@ken0nek
Copy link
Copy Markdown
Contributor Author

ken0nek commented Mar 10, 2022

@cortinico Thank you for the suggestion! Addressed.

@ken0nek ken0nek requested a review from cortinico March 10, 2022 18:49
1. Install Bundler and CocoaPods dependencies: `bundle install && bundle exec pod install`. In order to use Hermes engine instead of JSC, run: `USE_HERMES=1 bundle exec pod install` instead.
1. Install Bundler and CocoaPods dependencies: `bundle install && bundle exec pod install` or `yarn setup-ios-jsc`. In order to use Hermes engine instead of JSC, run: `USE_HERMES=1 bundle exec pod install` or `yarn setup-ios-hermes` instead.
1. Open the generated `RNTesterPods.xcworkspace`. This is not checked in, as it is generated by CocoaPods. Do not open `RNTesterPods.xcodeproj` directly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update commands on lines 51-52?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. Thank you.

@ken0nek ken0nek requested a review from cortinico March 11, 2022 22:43
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@cortinico has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @ken0nek in f001d09.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Mar 15, 2022
@ken0nek ken0nek deleted the work/rn-tester_Makefile branch March 15, 2022 19:07
Saadnajmi pushed a commit to Saadnajmi/react-native-macos that referenced this pull request Jan 15, 2023
Summary:
This pull request simplifies and makes it easy to debug the `rn-tester` project and switch configurations within the project.

- `yarn start` : Start packager
- `yarn install-android-jsc` : Build with `installJscDebug`.
- `yarn install-android-hermes` : Build with `installHermesDebug`.
- `yarn clean-android` : Clean up the Android build files.
- `yarn setup-ios-jsc` : Install dependencies to use JSC.
- `yarn setup-ios-hermes` : Install dependencies to use Hermes.
- `yarn clean-ios` : Clean up the build files and Pods.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[iOS] [Changed] - Add scripts to debug `rn-tester` easier

Pull Request resolved: facebook#33386

Test Plan:
<details><summary>Log</summary>
<p>

```sh
// packages/rn-tester

$ yarn setup-ios-jsc

yarn run v1.22.17
$ yarn install && bundle install && bundle exec pod install
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
success Already up-to-date.
Using rexml 3.2.5
Using CFPropertyList 3.0.5
Using concurrent-ruby 1.1.9
Using i18n 1.9.1
Using minitest 5.15.0
Using tzinfo 2.0.4
Using zeitwerk 2.5.4
Using activesupport 6.1.4.4
Using public_suffix 4.0.6
Using addressable 2.8.0
Using httpclient 2.8.3
Using json 2.6.1
Using algoliasearch 1.27.5
Using atomos 0.1.3
Using bundler 2.1.4
Using claide 1.1.0
Using fuzzy_match 2.0.4
Using nap 1.1.0
Using netrc 0.11.0
Using ffi 1.15.5
Using ethon 0.15.0
Using typhoeus 1.4.0
Using cocoapods-core 1.11.2
Using cocoapods-deintegrate 1.0.5
Using cocoapods-downloader 1.5.1
Using cocoapods-plugins 1.0.0
Using cocoapods-search 1.0.1
Using cocoapods-trunk 1.6.0
Using cocoapods-try 1.2.0
Using colored2 3.1.2
Using escape 0.0.4
Using fourflusher 2.3.1
Using gh_inspector 1.1.3
Using molinillo 0.8.0
Using ruby-macho 2.5.1
Using nanaimo 0.3.0
Using xcodeproj 1.21.0
Using cocoapods 1.11.2
Bundle complete! 2 Gemfile dependencies, 38 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Building RNTester with Fabric enabled.
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
[Codegen] generating an empty RCTThirdPartyFabricComponentsProvider
Building RNTester with Fabric enabled.
[Codegen] Skipping React-Codegen podspec generation.
[Codegen] generating an empty RCTThirdPartyFabricComponentsProvider
Building RNTester with Fabric enabled.
[Codegen] Skipping React-Codegen podspec generation.
[Codegen] generating an empty RCTThirdPartyFabricComponentsProvider
Analyzing dependencies
[Codegen] Found FBReactNativeSpec
[Codegen] Found rncore
[Codegen] Found ScreenshotmanagerSpec
Downloading dependencies
Installing FBLazyVector 1000.0.0
Installing FBReactNativeSpec 1000.0.0
Installing RCTRequired 1000.0.0
Installing RCTTypeSafety 1000.0.0
Installing React 1000.0.0
Installing React-Core 1000.0.0
Installing React-CoreModules 1000.0.0
Installing React-Fabric 1000.0.0
Installing React-RCTActionSheet 1000.0.0
Installing React-RCTAnimation 1000.0.0
Installing React-RCTBlob 1000.0.0
Installing React-RCTFabric 1000.0.0
Installing React-RCTImage 1000.0.0
Installing React-RCTLinking 1000.0.0
Installing React-RCTNetwork 1000.0.0
Installing React-RCTPushNotification 1000.0.0
Installing React-RCTSettings 1000.0.0
Installing React-RCTTest 1000.0.0
Installing React-RCTText 1000.0.0
Installing React-RCTVibration 1000.0.0
Installing React-callinvoker 1000.0.0
Installing React-cxxreact 1000.0.0
Installing React-graphics 1000.0.0
Installing React-jsi 1000.0.0
Installing React-jsiexecutor 1000.0.0
Installing React-jsinspector 1000.0.0
Installing React-logger 1000.0.0
Installing React-perflogger 1000.0.0
Installing React-rncore 1000.0.0
Installing React-runtimeexecutor 1000.0.0
Installing ReactCommon 1000.0.0
Installing Yoga 1.14.0
Generating Pods project
[DEDUCTED]/react-native/packages/rn-tester/Pods/Target Support Files/Pods-RNTester/Pods-RNTester.release.xcconfig
[DEDUCTED]/react-native/packages/rn-tester/Pods/Target Support Files/Pods-RNTester/Pods-RNTester.debug.xcconfig
[DEDUCTED]/react-native/packages/rn-tester/Pods/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests.release.xcconfig
[DEDUCTED]/react-native/packages/rn-tester/Pods/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests.debug.xcconfig
[DEDUCTED]/react-native/packages/rn-tester/Pods/Target Support Files/Pods-RNTesterIntegrationTests/Pods-RNTesterIntegrationTests.release.xcconfig
[DEDUCTED]/react-native/packages/rn-tester/Pods/Target Support Files/Pods-RNTesterIntegrationTests/Pods-RNTesterIntegrationTests.debug.xcconfig
React-Core
Integrating client project
Pod installation complete! There are 65 dependencies from the Podfile and 53 total pods installed.
✨  Done in 8.68s.
```

</p>
</details>

Reviewed By: ShikaSD

Differential Revision: D34835086

Pulled By: cortinico

fbshipit-source-id: 83649f42e8ac77efd8617601e18f15bfcf8f1f61
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Platform: iOS iOS applications. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants