Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 57DDC107BC for ; Tue, 6 Jan 2015 09:08:24 +0000 (UTC) Received: (qmail 49521 invoked by uid 500); 6 Jan 2015 09:08:25 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 49481 invoked by uid 500); 6 Jan 2015 09:08:25 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 49465 invoked by uid 99); 6 Jan 2015 09:08:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jan 2015 09:08:22 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of v-segreb@microsoft.com designates 157.56.110.136 as permitted sender) Received: from [157.56.110.136] (HELO na01-bn1-obe.outbound.protection.outlook.com) (157.56.110.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jan 2015 09:08:18 +0000 Received: from BL2PR03MB417.namprd03.prod.outlook.com (10.141.92.12) by BL2PR03MB418.namprd03.prod.outlook.com (10.141.92.13) with Microsoft SMTP Server (TLS) id 15.1.49.12; Tue, 6 Jan 2015 09:07:08 +0000 Received: from BL2PR03MB417.namprd03.prod.outlook.com ([10.141.92.12]) by BL2PR03MB417.namprd03.prod.outlook.com ([10.141.92.12]) with mapi id 15.01.0049.002; Tue, 6 Jan 2015 09:07:08 +0000 From: "Sergey Grebnov (Akvelon)" To: "dev@cordova.apache.org" Subject: RE: Cordova --list option implementation Thread-Topic: Cordova --list option implementation Thread-Index: AQHQKV/9XjSgdbogHk29A9kQLEQWu5yyy5Qw Date: Tue, 6 Jan 2015 09:07:07 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [109.60.135.109] authentication-results: spf=none (sender IP is ) smtp.mailfrom=v-segreb@microsoft.com; x-dmarcaction: None x-microsoft-antispam: BCL:0;PCL:0;RULEID:(3005003);SRVR:BL2PR03MB418; x-forefront-prvs: 0448A97BF2 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(479174004)(199003)(189002)(52604005)(51704005)(377454003)(24454002)(13464003)(252514010)(105586002)(19580405001)(106356001)(106116001)(19580395003)(2351001)(120916001)(46102003)(64706001)(20776003)(551544002)(66066001)(74316001)(107886001)(54356999)(99396003)(107046002)(2900100001)(99286002)(2950100001)(4396001)(76576001)(87936001)(2656002)(33656002)(102836002)(15975445007)(77096005)(450100001)(68736005)(561944003)(122556002)(62966003)(31966008)(101416001)(86612001)(92566001)(50986999)(110136001)(2501002)(76176999)(40100003)(86362001)(97736003)(21056001)(77156002);DIR:OUT;SFP:1102;SCL:1;SRVR:BL2PR03MB418;H:BL2PR03MB417.namprd03.prod.outlook.com;FPR:;SPF:None;MLV:sfv;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.onmicrosoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jan 2015 09:07:07.9981 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR03MB418 X-Virus-Checked: Checked by ClamAV on apache.org In case of 1a "Ignoring unknown flags" approach I would also warn for each = unknown parameter. -Sergey -----Original Message----- From: Parashuram N (MS OPEN TECH) [mailto:panarasi@microsoft.com]=20 Sent: Tuesday, January 6, 2015 6:22 AM To: dev Subject: Cordova --list option implementation Forking from Re: [DISCUSS] Tools Release to continue discussion. +1 to Andrew suggestion that adding a top level command just for listing targets would be an overkill. Also, people usually want to see the supporte= d targets when they run, so it makes sense to expose it closer to where it = gets used. If we decide that cordova target add could be used to create new targets, t= hat could be a separate top level command, can `cordova run wrote: >Josh - thanks for pointing out that the change isn't working as intended. >I >did some testing before merging, but didn't try the error conditions. > >I've just reverted the one to CLI that enables the flag. Let's move=20 >forward with releasing :) > >Also noticed that if you have an older-than-master version of android=20 >installed in your project, then you get: > >$ cordova run --list >Running command: >/Users/agrieve/git/cordova/cordova-cli/foo/platforms/android/cordova/ru >n >--list >ERROR : Run option '--list' not recognized. >ERROR running one or more of the platforms: Error: >/Users/agrieve/git/cordova/cordova-cli/foo/platforms/android/cordova/run: >Command failed with exit code 2 >You may not have the required environment or OS to run this project > >I actually do like the syntax of "cordova run --list", since the run=20 >command is the thing that --target is relevant to anyways. Maybe=20 >"--list-targets" would be more explicit? Adding "cordova target add" >would >be overstepping I think. You can add Android emulator targets as well,=20 >but us writing a wrapper for the logic would just make things more=20 >complicated I think. > >I do think that having cordova-lib look for the existence of the=20 >list-emulator-images and list-devices scripts makes sense, and just=20 >have it call them directly. > > >On Mon, Jan 5, 2015 at 5:29 PM, Josh Soref wrote: > >> Murat Sutunc wrote: >> >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 - >> > >>=20 >>https://issues.apache.org/jira/browse/CB-6676?jql=3Dproject%20%3D%20CB%2 >>0AN >>D >> >%20text%20~%20%22ignore%20parameter%22). Exit code 1 on Blackberry >>seems >> >like a bug. >> >> https://wiki.apache.org/cordova/CommandLineToolingDesign#Errors >> >> >> * 1: not implemented / unsupported command >> >> >> I believe that what windows phone was doing was correct. And if=20 >>someone is changing the contract, they failed to update the contract. >> >> > >> >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=20 >> >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=20 >> >already part of 'run' and it's easy to get confused: >> > cordova run --target=3DFOO >> > cordova target --list >> >> Not --list, just plain "list". As in "cordova platform list", and=20 >>"cordova plugin list", it's a commonly used idiom in cordova. >> >> >3) I don=B9t understand the 'cordova target add' command completely.=20 >> >Is >>it >> >an alias to 'cordova platform add'? >> >> No. >> >> For blackberry10 you can configure a "target" which is a name for a=20 >>set of settings (including an ip address/dns name, whether it is a =20 >>device/simulator, and a device password). You can then use run =20 >>--target=3Dfoo. >> >> >4) 'Each platform should already support the list-* commands' is=20 >> >currently not true. firefoxos, browser, Ubuntu don=B9t support it. >> >> Those platforms aren't complete, it's part of the contract, but we=20 >>already have a good way of handling missing components of lib/ < if=20 >>they don't exist (we can check for this), or aren't implemented (they=20 >>return a standard value). >> >> The way you've implemented it with run, there's no way to look before=20 >>you leap, which results in the failure that you introduced for=20 >>blackberry10. >> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org For additional commands, e-mail: dev-help@cordova.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org For additional commands, e-mail: dev-help@cordova.apache.org