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 A2E1217410 for ; Mon, 3 Nov 2014 21:32:33 +0000 (UTC) Received: (qmail 2435 invoked by uid 500); 3 Nov 2014 21:32:33 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 2390 invoked by uid 500); 3 Nov 2014 21:32:33 -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 2376 invoked by uid 99); 3 Nov 2014 21:32:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Nov 2014 21:32:32 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mmocny@google.com designates 209.85.223.177 as permitted sender) Received: from [209.85.223.177] (HELO mail-ie0-f177.google.com) (209.85.223.177) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Nov 2014 21:32:06 +0000 Received: by mail-ie0-f177.google.com with SMTP id tp5so5957728ieb.8 for ; Mon, 03 Nov 2014 13:30:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=0khZpz8W9gL2CtAuXcRDSHEJeJRXgslymW4wFjgw4yc=; b=WwDJdUmdxtGj9HYCuyyKiOUFp6jyij3pZenhQpLf6U1bNy0VPbeQglAKMxP+2s+OMg mitSTlFEBiZORLv1Ap7vfHlkQad/PGi+akywhoImU6c0nG+rpkmQn/Xb0P/uGobPtCJr NtYMTy/Q5auyNoGzGOffXYbJIeuTaYXW+RK0wXYsidtufg1AF8obfnaCHiC/xkK8ObIg 5JAqNVNgIPnWLbro+HsHOcvd7mqJtXU+qsHj5DVWwHnLMz7fMuyC36xArSYrHVynaKDn mikPjUriQ6UI7lRhYbaN0ceBY54bGC80OGXyZNWncUwqoXN5dsLILFZYY+LB3kQ6gljU vuiA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=0khZpz8W9gL2CtAuXcRDSHEJeJRXgslymW4wFjgw4yc=; b=HkUjxkE1R5A343A4FLI+Uo8XYWssHhdieI6QQKSRq9fJFwX8FJvdysFNazfjZEyDCI xZb1lVGJF/TKsj3cC3paiwmlTK4DqLSM3HXlwv0S7SnH9mnlowfTiRbLgVEGeyooTQZK clPJm961t21xTJobYEu9Fj6cyqyihULQvfFik= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=0khZpz8W9gL2CtAuXcRDSHEJeJRXgslymW4wFjgw4yc=; b=acjlSyGnmZPPiwWpBNpKLahaoFrN/LGDGOWH8H7ouSodfLo71WwDlNcBK2BqacfIuA c765ZJjoY8gVHZFz2pUORLDx74HcVlC0JQicptHAwR4NoBZL/9mfHKZ92SbDGWUyDdds DNmVcTVn636VF7LqA5UOW4Ax1XNHgS2Nu4o8JeXFId7TuzlP7NIBmekNqcQCEU58NLM6 0DR3h45vQ23CLoc6rhnY8Ql+a+tE+zuahYyDtPjBN2IOI43ih7LMqQE8V9a2EtA+SD2j cTY+ytxmzO8sV9gNoQumHuU90u7dvczFZQr5QxXIekjEowEocjEd1VPTqjqtNVddP4ne UQYg== X-Gm-Message-State: ALoCoQncmZatPNv4t3UBOtJlRwV7cCPKi8SV8sFclcDFyTLDo6/8nUhoJlWYsjmYmDqsiwmEPXat X-Received: by 10.50.129.33 with SMTP id nt1mr19491992igb.45.1415050235153; Mon, 03 Nov 2014 13:30:35 -0800 (PST) MIME-Version: 1.0 Sender: mmocny@google.com Received: by 10.64.59.168 with HTTP; Mon, 3 Nov 2014 13:30:14 -0800 (PST) In-Reply-To: <85A3E123BABF314D9D3656D0B418125643EC3E28@FMSMSX103.amr.corp.intel.com> References: <85A3E123BABF314D9D3656D0B418125643EC232A@FMSMSX103.amr.corp.intel.com> <85A3E123BABF314D9D3656D0B418125643EC3CB9@FMSMSX103.amr.corp.intel.com> <85A3E123BABF314D9D3656D0B418125643EC3E28@FMSMSX103.amr.corp.intel.com> From: Michal Mocny Date: Mon, 3 Nov 2014 16:30:14 -0500 X-Google-Sender-Auth: sd3kw1shImtKjyWZyC-1eDcFIbg Message-ID: Subject: Re: cordova xxx add - is there a problem? To: "Treggiari, Leo" Cc: Michal Mocny , dev Content-Type: multipart/alternative; boundary=047d7b4145fc9b2eaf0506fb0eca X-Virus-Checked: Checked by ClamAV on apache.org --047d7b4145fc9b2eaf0506fb0eca Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Okay, gotcha. I think you would like for each developer to be able to be able to work on any project regardless of locally available sdks, correct? E.g. if you on windows and some project supports ios, you should still be able to work on the wp/android parts, or use an iOS cloud build. That makes sense. Andrew mentioned earlier that we have actually started landing patches in this direction. Specifically, the "add" scripts should fail gracefully if the sdk is not available, in a way that is easy to recover from once the sdks are added (including cloning the repo on another machine). I don't think moving things to prepare-time is required for this, though it could be an option if needed. -Michal On Mon, Nov 3, 2014 at 3:38 PM, Treggiari, Leo wrote: > Hi Michal, > > > > Thanks for the information and considering this. The workflow that I wan= t > is somewhat different than what you have inferred from my previous mail. > > > > I do want =E2=80=9Cadd=E2=80=9D to set the metadata AND fetch the plugin = sources / > platform implementation. I think it is fair that if someone only wants t= o > set the metadata, that they use a command line option, or some other > method, for that. > > > > What I don=E2=80=99t want =E2=80=9Cadd=E2=80=9D to do is anything that re= quires the platform > SDKs. I want that to happen with =E2=80=9Cprepare=E2=80=9D and commands = that occur > post-prepare. If =E2=80=9Cprepare=E2=80=9D works incrementally based upo= n the project > metadata and knowledge of what it has done before, or if =E2=80=9Cprepare= =E2=80=9D always > redoes everything, then it should work if =E2=80=9Cadd=E2=80=9D does not = call =E2=80=9Cprepare=E2=80=9D, > right? If =E2=80=9Cprepare=E2=80=9D assumes that =E2=80=9Cadd=E2=80=9D h= as done any more than set the > metadata and fetch the sources, then a change would be necessary. > > > > Here=E2=80=99s an example scenario =E2=80=93 two developers working on th= e same project: > > =C2=B7 One uses CLI and develops on Mac for iOS and/or Android > > =C2=B7 One uses an IDE and develops on Windows for Windows Phone a= nd/or > Android > > > > One user creates the project. Either can add plugins and platforms. The > remainder of the workflow is specific to the tools each user is using, bu= t > they don=E2=80=99t get into each other=E2=80=99s way when they share the = =E2=80=98project=E2=80=99 in git =E2=80=93 > i.e. the project sources and the project metadata. > > > > Really we just need to iron out and land what Gorkem started. Does that > sound fair? > > > > Yes, but wouldn=E2=80=99t it be better to change =E2=80=9Cadd=E2=80=9D to= not call =E2=80=9Cprepare=E2=80=9D. You > suggested a "--skip-prepare" or "--save-only" type flag for > > the add commands. This would work as long as developers remembered to us > it when necessary. > > > > Thanks, > > Leo > > > > *From:* mmocny@google.com [mailto:mmocny@google.com] *On Behalf Of *Micha= l > Mocny > *Sent:* Monday, November 03, 2014 12:10 PM > > *To:* dev > *Cc:* Treggiari, Leo > *Subject:* Re: cordova xxx add - is there a problem? > > > > Prepare runs hooks, updates the platform config.xml's (using platform > defaults + plugin.xml's + app config.xml), and updates the www/ assets, > including re-adding plugin js-modules. > > > > In practice this takes about as long as copying all the files around. > However, pre/post prepare hooks are the most common place for application > developers to inject more complex conditional actions. Chrome Apps for > Mobile, for example, will automatically install platforms / plugins if th= ey > aren't already installed as part of pre-prepare. > > > > Anyway, its starting to sound like we wont actually need to change the cl= i > interface to address your needs: IDE's can just edit the config.xml > directly to insert dependant platforms/plugins (with gorkems work) withou= t > actually adding those asserts locally if that isn't important (i.e. for > remote cloud build). If you are working at the command line, I don't see > much value in supporting "add" without actually fetching the assets. > > > > Really we just need to iron out and land what Gorkem started. Does that > sound fair? > > > > -Michal > > > > On Mon, Nov 3, 2014 at 1:45 PM, Treggiari, Leo > wrote: > > I hate to see lots of new commands and/or options added. They are OK if > code is calling the commands (e.g. an IDE), but not so good for users. > > Certainly having a well-defined and documented place for the metadata re: > plugins and platforms is an important step forward. > > How smart is "prepare"? Does it work incrementally based upon the change= s > since the last time it was invoked, or is does it do all preparation ever= y > time? I ask from a performance perspective with respect to moving work > from "add" to "prepare", because it seems like "prepare" is called much > more often than "add". > > Regarding fetching the sources and local vs. remote builds, It's not just > where the build takes place that determines whether a client wants the > sources. The sources can be used for other things besides building, > including code-assist in an editor, emulation, companion apps, etc. > > Leo > > > -----Original Message----- > From: mmocny@google.com [mailto:mmocny@google.com] On Behalf Of Michal > Mocny > Sent: Monday, November 03, 2014 10:25 AM > To: dev > Cc: Treggiari, Leo > Subject: Re: cordova xxx add - is there a problem? > > I'm not sure that we should change the "cordova plugin/platform add" cli > command to not actually make the changes to platforms/ or plugins/, but > since both commands run "cordova prepare", we could move the logic to the > prepare step and then add a "--skip-prepare" or "--save-only" type flag f= or > the add commands? > > Alternatively, we could do something like what phonegap-cli does and have= a > "cordova remote plugin add" to differentiate local installs from mere > metadata updates. > > Either way, seems this is related to Gorkems work to add platform / plugi= n > deps to config.xml (though, the current implementation as it exists is > insufficient). > > -Michal > > On Fri, Oct 31, 2014 at 1:48 PM, Frederico Galv=C3=A3o < > frederico.galvao@pontoget.com.br> wrote: > > > Well, afaik 'cordova plugin add <>' only does 'cordova prepare' after t= he > > plugin stuff is done, and 'cordova prepare' works even without native > SDKs. > > > > 2014-10-30 23:43 GMT-02:00 Andrew Grieve : > > > > > There've been some changes to CLI in the last month that fix Android > > > requiring an SDK to run create & plugin add. Likewise, a fix just wen= t > in > > > this week (last week?) that fixes the slash problem for xcode project > > files > > > on windows. > > > > > > That said, I like your idea of not modifying platforms/ outside of > > prepare > > > / build. > > > > > > On Thu, Oct 30, 2014 at 10:48 AM, Treggiari, Leo < > > leo.treggiari@intel.com> > > > wrote: > > > > > > > Is there an issue with the semantics of "plugin add" and "platform > > add"? > > > > > > > > This is just a high level query to see if this is something worth > > > > discussing in more detail. I don't know exactly what each Cordova > CLI > > > > command does. My knowledge is based upon reading documentation > (which > > is > > > > sometimes wrong as noted in recent e-mails) and experimentation. > > > > > > > > What does "add" do? > > > > > > > > > > > > 1. For "plugin add" fetches the plugin sources. For "platform > > add" > > > > fetches the platform implementation if necessary. > > > > > > > > 2. Stores some metadata somewhere indicating that the plugin o= r > > > > platform was added? What and where this metadata is stored should = be > > > > better documented. > > > > > > > > 3. For "plugin add", processes plugin variables, if specified, > > which > > > > modifies the plugin sources. > > > > > > > > 4. Creates/modifies the native platform "project" (e.g. a Visu= al > > > > Studio, Eclipse, or Xcode, etc. project) to make the appropriate > > changes. > > > > > > > > If "plugin add" or "platform add" do more than this, I'd appreciat= e > > > being > > > > educated. > > > > > > > > My question is, should "add" stop at step #2 and leave the rest to > the > > > > prepare step? > > > > > > > > Here's why: > > > > > > > > * We see there is an issue with multiple developers on the > same > > > > project on different platforms. E.g. when one developer is on > Windows > > > > working on the Windows and Android versions of the project and > another > > is > > > > on Mac working on the iOS version of the project. If the shared > > project > > > > wants to add all three platforms (which it does...) then Cordova CL= I > > has > > > > problems. Basically because not much else than the "create" comman= d > > > works > > > > without having native SDKs installed. Would many issues be solved = if > > the > > > > "add" command did not require the presence of native SDKs, but rath= er > > > > "prepare" did? > > > > > > > > * There seems to be an issue with the co-existence of Cordov= a > > CLI > > > > and IDEs, and in particular with IDEs that want to build in the clo= ud > > > > without the requirement of native SDKs. It would be ideal if > multiple > > > > users on the same project could use different tools - e.g. one use > the > > > > command line and one use the IDE. The basic "definition" of a > Cordova > > > CLI > > > > project, i.e. the part that needs to be shared, is the list of > > platforms > > > > and plugins and the settings in the top level config.xml. If the > basic > > > > definition of the project could be created/edited from both the CLI > and > > > > various IDEs, then the rest of the development workflow (prepare, > > build, > > > > emulate, etc.) could be implemented in different ways, but the > project > > > > definition could still be shared. > > > > > > > > P.S. the "remove" command has similar semantics. > > > > > > > > Thanks, > > > > Leo > > > > > > > > > > > > > > > -- > > > > *Frederico Galv=C3=A3o* > > > > Diretor de Tecnologia > > > > PontoGet Inova=C3=A7=C3=A3o Web > > > > > > ( +55(62) 8131-5720 > > > > * www.pontoget.com.br > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org > For additional commands, e-mail: dev-help@cordova.apache.org > > > --047d7b4145fc9b2eaf0506fb0eca--