cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Murat Sutunc <mura...@microsoft.com>
Subject RE: [DISCUSS] Tools Release
Date Mon, 05 Jan 2015 22:22:23 GMT
Several thoughts,
1) When provided with an unknown extra parameter, such as --list in this case, all the platforms
ignore it. This looks like the expected behavior as there are several issues in Jira related
to it. (ex. See bug CB-6676 - https://issues.apache.org/jira/browse/CB-6676?jql=project%20%3D%20CB%20AND%20text%20~%20%22ignore%20parameter%22).
Exit code 1 on Blackberry seems like a bug. 
2) Introducing 'target' as a top level option seems like a new proposal. My thoughts were
to avoid having a new top level command for listing devices but I would like to hear others
opinions on this as well. I also think 'target' might not be the best choice of keyword here
as it's already part of 'run' and it's easy to get confused:
	cordova run --target=FOO
	cordova target --list
3) I don’t understand the 'cordova target add' command completely. Is it an alias to 'cordova
platform add'?
4) 'Each platform should already support the list-* commands' is currently not true. firefoxos,
browser, Ubuntu don’t support it. 

-----Original Message-----
From: Josh Soref [mailto:jsoref@blackberry.com] 
Sent: Monday, January 5, 2015 11:57 AM
To: dev@cordova.apache.org
Subject: Re: [DISCUSS] Tools Release

Murat Sutunc wrote:
> I've mentioned this compatibility issue with my first feature discussion
>mail.
> Currently in case a platform doesn't support --list flag,
> CLI will ignore the flag and run as if the flag is not provided (due to
>current args parsing logic in platforms),
> it won't be breaking any platform.
> I might be able to help with the compatibility issues if you need any
>assistance.

$ cordova run --list
Running command: /tmp/aa/platforms/android/cordova/run --list
Running command: /tmp/aa/platforms/blackberry10/cordova/run --list

  error: unknown option `--list'

ERROR running one or more of the platforms: Error:
/tmp/aa/platforms/blackberry10/cordova/run: Command failed with exit code 1
You may not have the required environment or OS to run this project
Available Android Devices:
Available Android Virtual Devices:


This output is really bad.


I'm pretty unhappy that the changes were landed as is, and I intend to
revert them.

Here's the design I'd like to see:

cordova target[s] list PLATFORM* [devices|emulators]

This shouldn't require any change to any of the platforms, since each
platform should already support the list-* commands.

It also works in the direction of:

cordova target add [PLATFORM] targetname -- …

Which would match more or less what webworks uses:

    webworks target add <target_id> <ip-address> [ -t device | simulator]
[-p <password>]  [--pin <device-pin>]


https://developer.blackberry.com/html5/documentation/v2_2/setting_up_test_t
argets.html
Mime
View raw message