react-native/scripts
Janic Duplessis 780fe80fca Don't validate ENTRY_FILE in react-native-xcode.sh (#32762)
Summary:
Reverts https://github.com/facebook/react-native/pull/29012

It is not really possible to properly validate if ENTRY_FILE exists since it is resolved by metro, and the server is not always running from the app root, like in a monorepo with multiple RN apps running on the same metro server.

In my case I run metro on the repo root and entry file will be something like `apps/app/index.js`. `-f "$ENTRY_FILE"` will fail since the script is run from the project folder (`PROJECT_ROOT`, in my case the `apps/app` folder, so it tries to resolve `apps/app/apps/app/index.js`).

I don't think this check is actually useful since metro will report the error if the entry file is invalid (fixed in https://github.com/facebook/react-native/pull/30150). The error is not as user friendly, but I think it is still fine. Maybe it could be improved in metro.

## Changelog

[iOS] [Fixed] - Don't validate ENTRY_FILE in react-native-xcode.sh

Pull Request resolved: https://github.com/facebook/react-native/pull/32762

Test Plan:
Before

<img width="854" alt="image" src="https://user-images.githubusercontent.com/2677334/146100834-39310c9f-1767-496a-8698-1026726a1120.png">

After if file is actually missing

<img width="987" alt="image" src="https://user-images.githubusercontent.com/2677334/146100893-d01e2247-c787-4174-ac60-2f308c338c8f.png">

After if file exists, builds successfully.

Reviewed By: cortinico

Differential Revision: D37066073

Pulled By: cipolleschi

fbshipit-source-id: 8f6b149099a39d9179996bb965daa6cd9e06feac
2022-06-10 06:56:26 -07:00
..
__tests__ Hermes: Add hermesc unit tests (#33914) 2022-05-30 02:59:35 -07:00
circleci Setup a toplevel downloadAll task (#33852) 2022-05-17 15:31:48 -07:00
cocoapods Use GCC_PREPROCESSOR_DEFINITIONS to set FB_SONARKIT_ENABLED (#33972) 2022-06-08 05:58:04 -07:00
codegen Fix tests for Windows (#33893) 2022-05-24 01:41:08 -07:00
hermes Hermes: Use arbitrary path to hermes-runtime-darwin if ENV set 2022-06-09 11:18:30 -07:00
react_native_pods_utils Run script phases tests in CI and Sandcastle (#33802) 2022-05-11 10:00:28 -07:00
versiontemplates Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
xcode Export REACT_NATIVE_PATH and fix find-node-for-xcode.sh fallback behavior (#33674) 2022-04-21 06:59:17 -07:00
.packager.env
.tests.env Bump OSS Android build to SDK 31 (#32606) 2021-11-24 12:27:26 -08:00
android-e2e-test.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
android-setup.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
bump-oss-version.js Fix up lint errors under react-native-github (#33622) 2022-04-22 16:25:25 -07:00
compose-source-maps.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
download-kotlin-compiler-with-buck.sh Download kotlin compiler JARs for Buck instead of checking them in (#33209) 2022-03-02 13:04:49 -08:00
find-node-for-xcode.sh Reintroduce find-node.sh as mitigation measure (#33538) 2022-04-04 02:43:07 -07:00
generate-api-docs.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
generate-artifacts.js Refactor generate-artifacts to improve testability. 2022-05-04 04:04:10 -07:00
generate-provider-cli.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
generate-specs-cli.js Update CodeGen to leverage the outputDir as suggested in diff review (#33729) 2022-05-04 04:04:10 -07:00
ios-configure-glog.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
launchPackager.bat Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
launchPackager.command Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
lint-java.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
node-binary.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
objc-test.sh fix: Make WebSocketTests work in CI (#33721) 2022-04-28 08:53:24 -07:00
packager-reporter.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
packager.sh Use realpath instead of readlink 2022-02-22 02:23:02 -08:00
prepare-package-for-release.js Fix up lint errors under react-native-github (#33622) 2022-04-22 16:25:25 -07:00
process-podspecs.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
publish-npm.js Do not fail if -javadoc.jar are missing in the final NPM package (#33869) 2022-05-19 02:48:39 -07:00
react_native_pods.rb Hermes: Use pre-built Hermes runtime in iOS Template tests (#33974) 2022-06-09 11:18:30 -07:00
react-native-xcode.sh Don't validate ENTRY_FILE in react-native-xcode.sh (#32762) 2022-06-10 06:56:26 -07:00
run_ruby_tests.sh Run script phases tests in CI and Sandcastle (#33802) 2022-05-11 10:00:28 -07:00
run-android-ci-instrumentation-tests.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
run-android-emulator.sh Use realpath instead of readlink 2022-02-22 02:23:02 -08:00
run-android-local-integration-tests.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
run-android-local-unit-tests.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
run-ci-e2e-tests.js Updating Yarn Cache path to fix broken CI (#32834) 2022-01-06 10:46:15 -08:00
run-ci-javascript-tests.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
run-instrumentation-tests-via-adb-shell.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
set-rn-template-version.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
set-rn-version.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
sync-css-layout.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
test-manual-e2e.sh fix: Access to relative paths when invoking test-manual-e2e (#33000) 2022-02-03 09:10:11 -08:00
try-n-times.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
update_podfile_lock.sh Use realpath instead of readlink 2022-02-22 02:23:02 -08:00
update-ruby.sh Added Gemfile.lock to git add files when calling update-ruby.sh (#33484) 2022-03-25 08:01:41 -07:00
validate-android-device-env.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
validate-android-sdk.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
validate-android-test-env.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
validate-ios-test-env.sh bump Node references from 12/14 to 14/16 (#32980) 2022-01-28 05:07:18 -08:00
version-utils.js Use CircleCI API to trigger releases (#32937) 2022-01-24 14:08:43 -08:00