Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix : Getting rid of stack traces during run-ios by using CLIError #1892

Merged

Conversation

arushikesarwani94
Copy link
Contributor

@arushikesarwani94 arushikesarwani94 commented Mar 27, 2023

Summary:

As highlighted in #1766, there are useless stack traces in errors during run-ios that are meant to be human-readable. Hence utilizing CLIError of it's ability to strip out the stack trace in such cases.

In case we are not able to find the simulators in Xcode, the error is direct and message is sufficient, hence removing the stack trace in such case to improve error reporting. This workflow is part of the onboarding experience of RN, there by this would improve DevX

Test Plan:

  1. Build cli codebase using : node ./scripts/build.js && yarn build:debugger.
  2. cd packages/cli-platform-ios
  3. Link packages using : yarn link
  4. In RN app AwesomeProject, run yarn link "@react-native-community/cli-platform-ios" to see successful linking :
arushikesarwani@arushikesarwani-mbp AwesomeProject % yarn link "@react-native-community/cli-platform-ios"
yarn link v1.22.19
warning ../package.json: No license field
success Using linked package for "@react-native-community/cli-platform-ios".
✨  Done in 0.05s.
arushikesarwani@arushikesarwani-mbp AwesomeProject % 
  1. react-native run-ios

@arushikesarwani94 arushikesarwani94 marked this pull request as ready for review March 27, 2023 22:54
@adamTrz adamTrz merged commit a5bbda3 into react-native-community:main Mar 28, 2023
@arushikesarwani94 arushikesarwani94 deleted the ios_cli_error branch March 29, 2023 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants