Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C8DFADD8A for ; Mon, 1 Oct 2012 10:33:04 +0000 (UTC) Received: (qmail 6301 invoked by uid 500); 1 Oct 2012 10:33:04 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 6013 invoked by uid 500); 1 Oct 2012 10:33:01 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 5963 invoked by uid 99); 1 Oct 2012 10:32:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2012 10:32:59 +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 brian.leroux@gmail.com designates 74.125.83.47 as permitted sender) Received: from [74.125.83.47] (HELO mail-ee0-f47.google.com) (74.125.83.47) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2012 10:32:53 +0000 Received: by eeit10 with SMTP id t10so1898156eei.6 for ; Mon, 01 Oct 2012 03:32:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=OLh3NUGNLN3gTkqvpWeR87xmhhBKGZSoBOLEUmBbb7k=; b=fsZUh01YqcFkETIwJqsnIod1uTOHVGw2JsYU1l0jS6bpysA8xZeNaJniQkP5xP/WwA OT5Ry2vWMe7X9wlv3h9O11srx68QSp6cbNkLjB/TgIX+h0cSJvMHCdSUN8rpfqgRwTce vp7A1q5oZRQOgfSKpEdBGG6H3iFV1aIdSUr7+XOEOdjBjM/06iXlMdW6T9UjeWXI+sj+ V6+M1vW+HQ4eqkf+b/Unfz7YJvZuTcg2ar8XSUI3cDUr3nCVoNI9VgpL1g2PB8jMdp4M +ENFLk66inLDEQ475qjBlab8ujV7WLiolz0+MOWIlTffDLLNPFDcDGkrkVP7YSusTcWX mvdQ== MIME-Version: 1.0 Received: by 10.14.173.131 with SMTP id v3mr17393400eel.15.1349087553618; Mon, 01 Oct 2012 03:32:33 -0700 (PDT) Sender: brian.leroux@gmail.com Received: by 10.14.100.76 with HTTP; Mon, 1 Oct 2012 03:32:33 -0700 (PDT) In-Reply-To: References: <-8529420762969790261@unknownmsgid> Date: Mon, 1 Oct 2012 12:32:33 +0200 X-Google-Sender-Auth: uNdTOLTLQ9vAhY-UIIE8jsNmMKk Message-ID: Subject: Re: Supporting multiple projects on iOS From: Brian LeRoux To: callback-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=047d7b62207a67829b04cafcec77 --047d7b62207a67829b04cafcec77 Content-Type: text/plain; charset=ISO-8859-1 Seems a little bit too brittle requiring users to install Cordova in order to share code they created with Cordova. (Which could cause good old fashioned path issues.) Again, would prefer libs live under the project they are dependencies for (as we do w/ Android). On Sep 29, 2012 8:32 PM, "Andrew Grieve" wrote: > On Sat, Sep 29, 2012 at 4:57 AM, Piotr Walczyszyn < > piotr.walczyszyn@gmail.com> wrote: > > > I think having a reference just to a project file doesn't solve 2 > > common scenarios: > > > > 1) multi developer environment, in this case all application > > developers need to have same directory structure, so the relative path > > to CordovaLib is the same > > > > 2) CordovaLib versioning, often you want to version the framework you > > are building on top of, together with the project source code. Having > > CordovaLib under project structure makes it whole easier. > > > > p. > > > > I think this does address both of these concerns. Here's an example > directory structure with three projects and two versions of cordova: > > SourceControlRoot/ > -- incubator-cordova-lib-version-2.1.0 > ----- CordovaLib > ----- bin > -- incubator-cordova-lib-version-2.2.0 > ----- CordovaLib > ----- bin > -- Project1 > ---- Project1.xcodeproj > ---- CordovaLib-2.1.0.xcodeproj (points to files within > //incubator-cordova-lib-version-2.1.0/CordovaLib) > -- Project2 > ---- Project2.xcodeproj > ---- CordovaLib-2.1.0.xcodeproj (points to files within > //incubator-cordova-lib-version-2.1.0/CordovaLib) > -- Project3 > ---- Project3.xcodeproj > ---- CordovaLib-2.2.0.xcodeproj (points to files within > //incubator-cordova-lib-version-2.2.0/CordovaLib) > > > To update Project2 from CordovaLib-2.1.0 to CordovaLib-2.2.0, you would run > (from the SourceControlRoot directory): > ./incubator-cordova-lib-version-2.2.0/bin/update_cordova_subproject.sh > Project2/Project2.xcodeproj > > > Piotr - I think it would still be fair to add an optional param > to update_cordova_subproject.sh to specify which CordovaLib directory you > want it to point at. I do like this idea of having one CordovaLib.xcodeproj > file per-project though, since it means not requiring a copy of CordovaLib > into each project. The "upgrade script" in this case will just be the same > as the update_cordova_subproject.sh script, and it won't have to delete any > source files, but just the xcodeproj files. > > > > > > > > 2012/9/29 Brian LeRoux : > > > would different versions will work ok? > > > > > > On Sat, Sep 29, 2012 at 2:33 AM, Andrew Grieve > > wrote: > > >> Another options I've now thought of, and I think I like this one the > > best > > >> :). > > >> > > >> Instead of copying the entire CordovaLib directory into each project, > > just > > >> copy the CordovaLib.xcodeproj file. This will allow each project to be > > open > > >> at the same time, since they will technically reference different > > projects, > > >> but they will all reference the same source files. To upgrade cordova > > >> versions, our update_cordova_subproject.sh script can clobber the > > >> .xcodeproj proj file with the newer one. > > >> > > >> > > >> On Fri, Sep 28, 2012 at 6:42 AM, Brian LeRoux wrote: > > >> > > >>> thinking a bundled upgrade cli command in all the projects is a good > > >>> idea... something that automates whatever we document in the upgrade > > >>> guide > > >>> > > >>> > > >>> > > >>> On Thu, Sep 27, 2012 at 6:58 PM, Jesse > > wrote: > > >>> > Mis-understood some of the finer points, thanks for the > clarification > > >>> > and patience all. > > >>> > > > >>> > I agree that option 2 makes the most sense. > > >>> > > > >>> > On Thu, Sep 27, 2012 at 9:52 AM, Mike Reinstein > > >>> > wrote: > > >>> >> an upgrade script would be really helpful as well. > > >>> >> > > >>> >> -Mike > > >>> >> > > >>> >> On Thu, Sep 27, 2012 at 12:44 PM, Piotr Walczyszyn < > > >>> >> piotr.walczyszyn@gmail.com> wrote: > > >>> >> > > >>> >>> As I suggested in the pull request comments, this would really > make > > >>> >>> sense to update bin/create script either by enhancing it with > > >>> >>> additional argument to embed the CordovaLib with newly created > > >>> >>> projects or even make this behavior a default one. > > >>> >>> > > >>> >>> p. > > >>> >>> > > >>> >>> 2012/9/27 Andrew Grieve : > > >>> >>> > Suppose you have 5 projects that depend on 2.1, and 3 that > > depend on > > >>> 2.0. > > >>> >>> > > > >>> >>> > One big difference between the two options is that for the 2nd > > >>> option, > > >>> >>> > you'd have 8 copies of Cordova, whereas for the first option > > you'd > > >>> have > > >>> >>> > only two. > > >>> >>> > > > >>> >>> > I think getting the correct workflow set up with Xcode > workspaces > > >>> will be > > >>> >>> > quite cumbersome though, and not something that will be easy > for > > us > > >>> to do > > >>> >>> > with tooling. We'd pretty much have to rely on documentation to > > tell > > >>> >>> people > > >>> >>> > how to drag multiple projects into their own workspace. > > >>> >>> > > > >>> >>> > I think maybe another key point is that CordovaLib is really > > small, > > >>> and > > >>> >>> > will get even smaller if/when we remove the core plugins from > > it. In > > >>> this > > >>> >>> > model, the majority of the code will be pluginstalled into > users' > > >>> >>> projects > > >>> >>> > anyways, so it won't be a bit deal to have a bunch of copies of > > >>> >>> CordovaLib > > >>> >>> > around. > > >>> >>> > > > >>> >>> > The model that pwalczyszyn is using is to copy the CordovaLib > > >>> directory > > >>> >>> > into each project's directory, similar to how we have a > "cordova" > > >>> >>> directory > > >>> >>> > that we copy into it. Taken from his pull requests comments: > > >>> >>> > > > >>> >>> > MyProject > > >>> >>> >> -- cordova > > >>> >>> >> -- MyProject > > >>> >>> >> ---- CordovaLib > > >>> >>> >> ------ CordovaLib.xcodeproj > > >>> >>> >> ---- Plugins > > >>> >>> >> ---- Resources > > >>> >>> >> ---- .... > > >>> >>> >> -- MyProject.xcodeproj > > >>> >>> >> -- www > > >>> >>> > > > >>> >>> > > > >>> >>> > Having CordovaLib a sibling of Plugins does make sense in this > > model > > >>> I > > >>> >>> > think. Either that, or have it up one level. > > >>> >>> > > > >>> >>> > > > >>> >>> > To implement this, we'll need to change our bin/create script > to > > >>> copy in > > >>> >>> > the CordovaLib directory. Not too hard. > > >>> >>> > > > >>> >>> > For upgrades, how will we address this though? Just add > > documentation > > >>> >>> > telling users to delete the old directory and copy over the new > > one? > > >>> The > > >>> >>> > steps would be: > > >>> >>> > cp -r path/to/new/cordova/CordovaLib MyProject > > >>> >>> > path/to/new/cordova/bin/update_cordova_subproject MyProject > > >>> >>> > MyProject/CordovaLib > > >>> >>> > > > >>> >>> > > > >>> >>> > > > >>> >>> > > > >>> >>> > > > >>> >>> > > > >>> >>> > > > >>> >>> > > > >>> >>> > On Thu, Sep 27, 2012 at 10:16 AM, Dave Johnson < > > >>> dave.c.johnson@gmail.com > > >>> >>> >wrote: > > >>> >>> > > > >>> >>> >> +1 > > >>> >>> >> > > >>> >>> >> On Thursday, September 27, 2012, Mike Reinstein wrote: > > >>> >>> >> > > >>> >>> >> > Agree on all points with Brian. > > >>> >>> >> > > > >>> >>> >> > On Thu, Sep 27, 2012 at 6:34 AM, Brian LeRoux > >>> >>> > > > >>> >>> >> > wrote: > > >>> >>> >> > > > >>> >>> >> > > > Global dependancies? It's a library, why would you not > be > > >>> >>> dependent > > >>> >>> >> on > > >>> >>> >> > > it? > > >>> >>> >> > > > > > >>> >>> >> > > > > >>> >>> >> > > We're talking about global deps vs local deps. Not whether > > or > > >>> not > > >>> >>> >> you'll > > >>> >>> >> > > have a dependency! > > >>> >>> >> > > > > >>> >>> >> > > > > >>> >>> >> > > > Standardize on the apis and not the files. > > >>> >>> >> > > > > > >>> >>> >> > > > > >>> >>> >> > > Uh, ok sure, not sure I understand? > > >>> >>> >> > > > > >>> >>> >> > > It only takes a few weeks of ruby (and/or python) dev to > see > > >>> where > > >>> >>> >> global > > >>> >>> >> > > packages become ambushes for epic fail. Node learned from > > this > > >>> and > > >>> >>> >> > > explicitly created lexically scoped packages. Typically > > when you > > >>> >>> ship > > >>> >>> >> > > projects you want to have the dependencies bundled to > > minimize > > >>> >>> issues. > > >>> >>> >> > > > > >>> >>> >> > > See http://en.wikipedia.org/wiki/Dependency_hell > > >>> >>> >> > > > > >>> >>> >> > > > > >>> >>> >> > > Not to mention the extra complexity of #2, and multiple > out > > of > > >>> sync > > >>> >>> >> > > > project issues. > > >>> >>> >> > > > > > >>> >>> >> > > > > >>> >>> >> > > I do not see where this creates complexity. It reduces > it. I > > >>> have a > > >>> >>> >> > project > > >>> >>> >> > > that I want up-do-date. It has a dependency on 2.1.0. I > have > > >>> another > > >>> >>> >> > > project I do not want to update running 2.0.0: no problem. > > If I > > >>> >>> have a > > >>> >>> >> > > global dependency: problem! > > >>> >>> >> > > > > >>> >>> >> > > The other issue here is the requirement of having your > > library > > >>> >>> >> > > a separate concern for the end user project. When I want > to > > >>> build a > > >>> >>> >> > project > > >>> >>> >> > > from another repo it requires me to install the correct > > version > > >>> of > > >>> >>> the > > >>> >>> >> > > dependency. With option 2 the library is a part of the > > project > > >>> and > > >>> >>> no > > >>> >>> >> > > installer step is required. Again: reduced complexity. > > >>> >>> >> > > > > >>> >>> >> > > > > >>> >>> >> > > > > >>> >>> >> > > I originally moved the codebase to a library and created > the > > >>> >>> template > > >>> >>> >> > > > over 2 years ago, so I may be blind to the benefits of > #2, > > >>> but to > > >>> >>> me > > >>> >>> >> > > > this makes our library become a boilerplate... am I > wrong? > > >>> >>> >> > > > > > >>> >>> >> > > > > >>> >>> >> > > Do not see how this is related either. > > >>> >>> >> > > > > >>> >>> >> > > > >>> >>> >> > > >>> >>> > > >>> > > > >>> > > > >>> > > > >>> > -- > > >>> > @purplecabbage > > >>> > risingj.com > > >>> > > > --047d7b62207a67829b04cafcec77--