-
-
Notifications
You must be signed in to change notification settings - Fork 197
Command "emulate" and options "--emulator/--device/--avd" are a bit confusing to use #2349
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
Comments
I like Option 2. |
The --avd option is depricated and it is not supported for some time now. |
the option may be deprecated but it is available, as well as --geny option, as @rosen-vladimirov reminded me recently. Also I am not sure removing the command helps a lot - it will still be confusing to use |
It is not necessary to use the |
I also believe that we should remove |
@pkoleva @rosen-vladimirov I vote for removing the emulate command and replace it with |
Before we deprecate the In 2.5.1, I am still unable to specify a specific iOS device when using the
But this command DOES work:
I would expect the first command to behave identically to the second, launching the iOS emulator with the specified device. Further, if we deprecate the |
@toddanglin I was thinking something along the lines of: Check for --device option:
|
There are scenarios where I only want to run my app on the emulators, even if I have a device connected. So if we take this path, I have to explicitly know the name of my emulators...or I have to disconnect all of my devices. There is no direct equivalent for Is there a harm in keeping the Meanwhile, for cases where the device name is known, your proposal is fine so long as |
@toddanglin you're right, that's why if you run
There's no harm in keeping the command per se, but the fact is it has caused us trouble in the past. If we have duplicate functionality I see no reason in keeping both ways to do the same thing. |
IMO if I have to chose to remove one of "--emulator" or "emulate", I'll choose to remove the first one. I think "--device" option is sufficient to cover the need to run an app on a specific device/emulator/simulator. About "emulate", before removing it we should first define who uses it and how and then find a way to provide the users a way to continue working like they did before. |
@pkoleva I agree. I think the @Plamen5kov My concern is that
Compared to the consistency of today's command:
Further, if use I |
Hey all, We had a discussion and came up with the following ideas. I'll be happy if you share what you think. We defined 2 main scenarios:
If we remove
The benefit from using @toddanglin If you don't have connected devices and running emulators |
This approach works fine for me if What about the other
I've used both at various times...with iOS to get list of available simulator names and with Android to adjust timeout for slow loading simulator. |
Can we also cover the cases when we specify name of emulator image (instead of running android device identifier, like Example: |
We're going to make the implementation described above by @pkoleva. I'm going to describe all cases we're going to support:
EDIT: deprecating the emulate comand. |
And again, what about the additional flags available on
Will they work with Critically, I think we should keep |
@toddanglin |
I'm not sure that The first command just lists connected devices (similar to The second command shows a list of ALL valid iOS simulator device names you could use for emulation + any actual connected device names. That said, I'm okay with moving the functionality of |
emulate command is used to run an app on an emulator but we already have options to specify on what device to run the app.
The different options that one can use to define deployment target are behaving differently
--device - can be used to specify which device to be targeted and accepts device id and device name for some commands -> related issue 2345
run --emulator = emulate, but the option does not accept any parameters - related 2329
If emulate command is removed, to specify which device you'll use, you'll have to type the below command
tns run android/ios --emulator --device {DeviceName/Id}
I think we should agree on some kind of flow that covers the most common use cases.
For me the way I use these options is something like that ->
Option 1 - no emulate command
tns run/debug/deploy/livesync --emulator
- starts emulator and ignores all connected real devicestns run/debug/deploy/livesync --emulator {EmulatorName/Id}
- starts/connects to specified emulator or if it doesn't exist give a meaningful error message'tns run/debug/deploy/livesync --device {EmulatorName/Id}' - starts/connects to specified emulator or if it doesn't exist give a meaningful error message
Option 2 - no --emulator option
tns emulate
- starts emulator and runs app on it, ignores all connected real devicestns emulate --device {DeviceName/Id}
- starts emulator with specified name and runs the app on it'tns run/debug/deploy/livesync --device {EmulatorName/Id}' - starts/connects to specified emulator or if it doesn't exist give a meaningful error message
The text was updated successfully, but these errors were encountered: