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

Add back CLI --platform option #1954

Merged
merged 3 commits into from
Sep 2, 2024

Conversation

tokou
Copy link
Contributor

@tokou tokou commented Aug 27, 2024

Proposed changes

  • I saw that the --platform option existed in the past and has been deprecated in 1.11.0
  • I was wondering of the reason behind it as I think it might be very useful in local development scenarios
    • I often have one iOS and one Android device running as I develop a new feature
    • We often write single flows that run on both platforms
    • I'm often working on fixing code for a flow on a single platform at a time (generally Android then iOS)
    • I find myself having to always select a device while using --platform would make things much simpler for me
  • The way I suggest adding it back here is in an optional fashion
    • No --platform works as before
    • --platform gets ignored in case --device is set
    • --platform set and a single device from that platform is connected: We select that device without prompt
    • --platform and multiple devices from that platform are connected: We prompt the user with only the relevant platform devices displayed
  • If there's an issue with reverting it at the App level that I did not notice. May I suggest adding it to the TestCommand only in that case?

Testing

  • Run --platform alongside --device
  • Run --platform with a single device from each platform running
  • Run --platform with multiple devices from different platforms running

Issues fixed

Linked #314

@bartekpacia bartekpacia force-pushed the revert-cli-platform-option branch from b9ecc66 to 45edf89 Compare August 29, 2024 23:09
@tokou
Copy link
Contributor Author

tokou commented Aug 31, 2024

I'm more and more thinking that this should be added to the Test command only 🤔 wdyt @bartekpacia ?

@bartekpacia
Copy link
Contributor

There's also maestro hierarchy command which should also work with --udid and --platform options.

But overall yes, I agree that --platform (and --udid) shouldn't be top-level options on the maestro command. But to keep consistency, let's continue doing it.

In a separate PR you might want do add those options to individual commands (and deprecate those top-level options, so we can remove them later).

@bartekpacia bartekpacia merged commit ade9f98 into mobile-dev-inc:main Sep 2, 2024
4 checks passed
@tokou tokou deleted the revert-cli-platform-option branch September 3, 2024 07:21
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.

2 participants