Skip to content

Conversation

@szymonrybczak
Copy link
Collaborator

Summary:

To avoid confusion between run-android and run-ios, I deprecated --device-id in favour of --device. When someone will use --device-id` a warning will be presented, so that users can migrate their scripts.

Test Plan:

  1. Clone the repository and do all the required steps from the Contributing guide
  2. Run this command:
node /path/to/react-native-cli/packages/cli/build/bin.js run-android --deviceId "asdf"

Should give the warning and pass id the same way as before.
3. Run this command:

node /path/to/react-native-cli/packages/cli/build/bin.js run-android --device "asdf"

Should launch an app on passed id.

Checklist

  • Documentation is up to date to reflect these changes.
  • Follows commit message convention described in CONTRIBUTING.md

@szymonrybczak szymonrybczak requested a review from cortinico as a code owner May 6, 2024 17:35
@github-actions github-actions bot added docs Documentation change infra Internal work not facing public APIs labels May 6, 2024
@szymonrybczak
Copy link
Collaborator Author

Unfortunately, to my knowledge, adb devices doesn't provide as much information about emulators/physical devices as Apple's commands do, so I had to limit the options' features compared to run-ios's.

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
@thymikee thymikee merged commit efd6bd4 into main Jun 5, 2024
@thymikee thymikee deleted the chore/deprecate-device-id branch June 5, 2024 08:38
High5Apps added a commit to High5Apps/organize-rn that referenced this pull request Oct 2, 2024
- Perform all changes recommended by the Upgrade Helper except:
  - yarn-related code. I tried switching from npm to yarn, but I couldn't figure out how to get yarn to import the info from the existing package-lock.json into yarn.lock. The switch from npm to yarn can always be done in the future
  - updating gradle-wrapper.jar since it is a binary file
  - https://react-native-community.github.io/upgrade-helper/?from=0.73.6&to=0.75.3&package=app.getorganize.organize&name=Organize
- Use align-deps to update and align dependencies
- Update Android studio from Iguana to Ladybug because Iguana had a max Android Gradle Plugin of 8.3.2, but 8.5.x is required
- Updated react-native-pager-view from 6.2.1 to 6.4.1 to fix Android build failure
- Updated react-native-vision-camera from 4.0.1 to 4.5.3 to fix Android build failure
- Updated react-native-vector-icons from 10.0.3 to 10.2.0 to fix Android release build error
- Removed 73 instances of defaultProps and disabled react/require-default-props in .eslintrc.js to fix warnings that defaultProps is now deprecated
  - All defaults (except undefined) were transferred without changes to argument defaults. It seems like many of these could be removed completely, but doing so seemed unwise since there could unanticipated side-effects from code that expected the default value instead of undefined
  - However, CommentList's insertedComments default of [] was changed to undefined to prevent an infinite loop that happened when navigating to a PostScreen and trying to display CommentList. I'm not sure why this happened.
- Fix VerificationScreen unexpectedly showed an inputAccessory bar above the keyboard with a "Next" button by setting TextInputRow returnKeyType to none
- Known Issues
  - `npm run ios:device:release` hangs on the install step, but this also happened before upgrading
  - Navigating to the Discuss tab shows a warning due to material-top-tabs. It has been fixed upstream, but hasn't been released yet. It'll likely be included in @react-navigation/material-top-tabs@6.6.15
  - There's a new warning when running `npm run android:device:release` or `npm run android:device` about switching from --deviceId to --device. I attempted to do this in scripts/run-android, but it failed with "error No Android device or emulator connected."
    - This is a very recent change, so it'll probably be fixed soon. Until then, I'll stay on the deprecated --deviceId
    - react-native-community/cli#2377
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation change infra Internal work not facing public APIs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants