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 52AFB10E60 for ; Thu, 17 Apr 2014 21:01:38 +0000 (UTC) Received: (qmail 61895 invoked by uid 500); 17 Apr 2014 21:01:37 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 61861 invoked by uid 500); 17 Apr 2014 21:01:37 -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 61853 invoked by uid 99); 17 Apr 2014 21:01:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Apr 2014 21:01:37 +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 (athena.apache.org: domain of brian.leroux@gmail.com designates 209.85.223.169 as permitted sender) Received: from [209.85.223.169] (HELO mail-ie0-f169.google.com) (209.85.223.169) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Apr 2014 21:01:33 +0000 Received: by mail-ie0-f169.google.com with SMTP id to1so927507ieb.28 for ; Thu, 17 Apr 2014 14:01:12 -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:message-id:subject :from:to:content-type; bh=Ay9EehN5Kknp9oh1oLofNRoJPgcMrAfwKRpHL6WiWto=; b=aB73Oom8NdJbVD2njWvh3Zofek1HQIJCFVVjxeammee/6xRlVkhSTS6go0lOtP/JLO y2Qr1DaE9mb38aiuaqMWzmPIAcFKbFKzNuSP8LlhUokElzeLslNnNzmHQM3LBm9UqQXO GAPaKBWpK6raTVzLO3kOCiPD/J+godRmnrUod+nQVlSskOkmBoCQvvJ7yj/Yvdx+xC3q +2CFWMys/luOlsZgXJ6uWcxNAkvFptbO6dkfYaLeuUNwcwkLXpXdeXi/xRWsCuNwqyT2 JtzrwzgNqrelV2Xn+mLrsiQIg/t6d5n76nJoK77mPMSnMuVnhHhAvVn/YAJZT4+yP/1B EFxA== MIME-Version: 1.0 X-Received: by 10.50.30.170 with SMTP id t10mr13856651igh.7.1397768472790; Thu, 17 Apr 2014 14:01:12 -0700 (PDT) Sender: brian.leroux@gmail.com Received: by 10.50.111.70 with HTTP; Thu, 17 Apr 2014 14:01:12 -0700 (PDT) In-Reply-To: References: <534f1cdd.894d320a.1ccf.31e1@mx.google.com> Date: Thu, 17 Apr 2014 14:01:12 -0700 X-Google-Sender-Auth: La-cIB8snM5V6ZyZ71JE2ZYnPow Message-ID: Subject: Re: Proposal for cli and plugman code rearrangement From: Brian LeRoux To: "dev@cordova.apache.org" Content-Type: multipart/alternative; boundary=047d7bdc0a564d169304f74355cb X-Virus-Checked: Checked by ClamAV on apache.org --047d7bdc0a564d169304f74355cb Content-Type: text/plain; charset=UTF-8 this is great stuff, thanks everyone, I'm going to kick up threads for the three open questions On Thu, Apr 17, 2014 at 1:23 PM, Steven Gill wrote: > Looks great! > > https://issues.apache.org/jira/browse/INFRA-7596 > > > On Thu, Apr 17, 2014 at 12:07 PM, Michal Mocny > wrote: > > > Great showing, everyone. Here's a quick summary: > > > > - Steve will file INFRA ticket to create a single new cordova-lib repo. > > - We will create node_modules/ folder inside cordova-lib, and Ian will > use > > git magic to create two node modules: cordova-cli, and plugman, importing > > the full git history for each dir. > > - We will remove the CLI bits from cordova-lib as a secondary patch [TBD: > > exactly how much can we remove] > > - We will remove the cordova-lib bits from cordova-cli and plugman [TBD: > > same question as above], updating the require() paths and adding > > cordova-lib-cordova-cli and cordova-lib-plugman to npm deps. > > - At this point, all the code should be 100% the same, the paths just > > changed a bit. > > - Over time, we dedup and break out code from cordova-lib-cordova-cli and > > cordova-lib-plugman into dedicated npm modules. > > - At first, cordova-cli and cordova-plugman continue to depend only on > > cordova-lib, and cordova-lib interface routes to correct npm modules, but > > eventually we refactor CLI's to directly consume the top-level npm module > > entry points (i.e. perhaps like cordova-lib-project-create, > > cordova-lib-plugin-publish) > > - At that point, we can consider which npm modules are not really > > cordova-lib, but really generic npm modules to live in dedicated repos > > (perhaps even entirely outside of cordova project, but not sure how to do > > that..). > > > > Some open questions: > > - How exactly are we going to version / tag / apache release process > > cordova-lib modules? > > - How much of CLI's stay in cli: is it a *really* dumb wrapper that > parses > > input in a generic fashion and turns it into dumb require() calls with > > opt's? Or does it understand the full spec and massage opts into the > forms > > cordova-lib-* expect (both options have value!) > > - Do CLI's have deps on specific versions of cordova-lib-*, so an apache > > release means pushing updated package.json deps? > > > > In case it isn't clear to everyone, some of the net benefits of this new > > approach, we think, are: > > - We have a saner model for code sharing between all the CLI (not just > > plugman and cordova-cli, but also phonegap, cca, bb, ibm, etc downstream > > distributions). > > - We are not impeded by overhead to create a new npm module, which is > > easier to test and reason about. > > - We don't push any specific CLI binary onto users if all they want is > some > > lib feature. > > > > > > Anything else? > > > > > > > > On Thu, Apr 17, 2014 at 2:11 PM, Victor Sosa > > wrote: > > > > > Are you planning to live stream the hangout? > > > > > > > > > 2014-04-17 12:56 GMT-05:00 Michal Mocny : > > > > > > > On Thu, Apr 17, 2014 at 1:28 PM, Andrew Grieve > > > > > wrote: > > > > > > > > > Some points of discussion for evaluating one repo vs multiple > repos: > > > > > > > > > > - Git Tags > > > > > - Atomic commits > > > > > - Going back in time (checking out points in history) > > > > > - Co-ordinating Pull Requests > > > > > > > > Also: > > > > - Expectations from external contributors > > > > - Transitioning from what we have today > > > > - Overhead of breaking out code into an npm module > > > > > > > > And some specific questions to discuss today: > > > > - should plugman module contain the CLI interface only -- forward > calls > > > to > > > > dedicated plugin management npm modules (same as cordova), or should > it > > > > itself implement those modules? > > > > - If we start with a single code repo for npm modules: > > > > - do we include cordova and plugman CLI interfaces or just > > > > implementations? > > > > - How do we import module implementation and retain history (git > > magic) > > > > - node_modules/ folder suggestion from Isaacs on twitter -- protip or > > > joke? > > > > - name for "cordova-lib" -- whats common on npm? > > > > - Testing > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Wed, Apr 16, 2014 at 4:14 PM, purplecabbage < > > > purplecabbage@gmail.com> > > > > > wrote: > > > > > > Oops, I am okay with anytime tomorrow. > > > > > > How can they not list time zones in the UI? > > > > > > > > > > > > Sent from my iPhone > > > > > > > > > > > >> On Apr 16, 2014, at 3:05 PM, Victor Sosa < > sosah.victor@gmail.com> > > > > > wrote: > > > > > >> > > > > > >> Great!! Thanks Mark > > > > > >> > > > > > >> > > > > > >> 2014-04-16 17:02 GMT-05:00 Mark Koudritsky : > > > > > >> > > > > > >>> I'll arrange a hangout invite link several minutes before the > > > start. > > > > > >>> > > > > > >>> > > > > > >>> On Wed, Apr 16, 2014 at 5:44 PM, Victor Sosa < > > > sosah.victor@gmail.com > > > > > > > > > > >>> wrote: > > > > > >>> > > > > > >>>> Is this agreed? Are we going to have the meeting on Thursday, > > > April > > > > > 17, > > > > > >>>> 14:00 ET? > > > > > >>>> Who's going to send the hangout invite? > > > > > >>>> > > > > > >>>> > > > > > >>>> 2014-04-16 16:40 GMT-05:00 tommy-carlos williams < > > > > tommy@devgeeks.org > > > > > >: > > > > > >>>> > > > > > >>>>> Cruel. > > > > > >>>>> > > > > > >>>>> The only difference in the Doodle between 2pm PST and 4pm+ > PST > > is > > > > > Jesse > > > > > >>>>> and Brian. > > > > > >>>>> > > > > > >>>>> This won't be forgotten. You two are on my list now ;) > > > > > >>>>> > > > > > >>>>> 4am on Good Friday, here I come. Yay? > > > > > >>>>> > > > > > >>>>> - tommy > > > > > >>>>> > > > > > >>>>>> On 17 April 2014 at 6:51:47 am, Mark Koudritsky ( > > > > kamrik@google.com) > > > > > >>>>> wrote: > > > > > >>>>> > > > > > >>>>> Ok, according to the doodle < > > http://doodle.com/uvyr9454pvepz3a3> > > > > > >>>> tomorrow > > > > > >>>>> 14:00 Eastern = 11:00 Pacific seems to be an ok time. (I > hope I > > > got > > > > > the > > > > > >>>>> time zones right). > > > > > >>>>> Let's organized a hangout tomorrow. > > > > > >>>>> > > > > > >>>>> For the calendars: > > > > > >>>>> Thursday, April 17, 14:00 ET > > > > > >>>>> Thursday, April 17, 11:00 PT > > > > > >>>>> > > > > > >>>>> > > > > > >>>>> > > > > > >>>>>> On Wed, Apr 16, 2014 at 4:23 PM, Brian LeRoux > > > wrote: > > > > > >>>>>> > > > > > >>>>>> To clear up my intent, I'm proposing > > > > > >>>>>> > > > > > >>>>>> 1. Keep the Plugman and Cordova/CLI as separate repos that > we > > > > > publish > > > > > >>>> as > > > > > >>>>>> discreet modules (and use npm / package.json to manage deps) > > > > > >>>>>> 2. Create a new placeholder repo for staging common module > > > > > extraction > > > > > >>>>>> called cordova-lib > > > > > >>>>>> 3. Publish many modules from this one git repo called > > > cordova-lib > > > > > and > > > > > >>>>>> prefix any module from it with `cordova-lib` (for example > > > > > >>>>>> cordova-lib-app-create would be a great module for sharing) > > > > > >>>>>> 4. Evaluate if any modules can graduate from cordova-lib to > > more > > > > > >>>>> generally > > > > > >>>>>> useful status and get their own git repos > > > > > >>>>>> > > > > > >>>>>> Thoughts? > > > > > >>>>>> > > > > > >>>>>> > > > > > >>>>>> > > > > > >>>>>> On Wed, Apr 16, 2014 at 12:28 PM, Carlos Santana < > > > > > >>> csantana23@gmail.com > > > > > >>>>>>> wrote: > > > > > >>>>>> > > > > > >>>>>>> Brian > > > > > >>>>>>> yep I agree with directory "cordova-lib", "node_modules", > > > > "common". > > > > > >>>>>>> "common-lib" > > > > > >>>>>>> I think we are on the same page. > > > > > >>>>>>> > > > > > >>>>>>> What do you mean by "published"? in "-package.json > (published > > > as > > > > > >>>>>>> cordova-lib-plugin-install)" > > > > > >>>>>>> > > > > > >>>>>>> no actually publishing to npm registry, but just having a > > > > > >>> convention > > > > > >>>>> for > > > > > >>>>>>> the naming of the modules all starting with "cordova-lib-*" > > and > > > > > >>>>> matching > > > > > >>>>>>> location within repo? > > > > > >>>>>>> > > > > > >>>>>>> { > > > > > >>>>>>> "version": "0.0.1", > > > > > >>>>>>> "name": "cordova-lib-plugin-install", > > > > > >>>>>>> .. > > > > > >>>>>>> } > > > > > >>>>>>> > > > > > >>>>>>> { > > > > > >>>>>>> "version": "0.0.1", > > > > > >>>>>>> "name": "cordova-lib-util-a", > > > > > >>>>>>> .. > > > > > >>>>>>> } > > > > > >>>>>>> > > > > > >>>>>>> > > > > > >>>>>>> > > > > > >>>>>>> > > > > > >>>>>>> > > > > > >>>>>>>> On Wed, Apr 16, 2014 at 3:11 PM, Brian LeRoux > > > > > wrote: > > > > > >>>>>>>> > > > > > >>>>>>>> I'm thinking a clean path might look something like this: > > > > > >>>>>>>> > > > > > >>>>>>>> plugman > > > > > >>>>>>>> '-package.json -> cordova-lib-plugin-install > > > > > >>>>>>>> > > > > > >>>>>>>> cordova-cli > > > > > >>>>>>>> '-package.json -> cordova-lib-plugin-install > > > > > >>>>>>>> > > > > > >>>>>>>> cordova-lib > > > > > >>>>>>>> |-plugin-install > > > > > >>>>>>>> | '-package.json (published as cordova-lib-plugin-install) > > > > > >>>>>>>> etc > > > > > >>>>>>>> > > > > > >>>>>>>> Wherein all the 'meat' ends up in cordova-lib and > > > > > >>>> plugman/cordova-cli > > > > > >>>>>>>> become light CLI wrappers. I don't see any reason we > > > > > >>> change/remove > > > > > >>>>> the > > > > > >>>>>>>> already extracted repos for the CLI and Plugman. > > > > > >>>>>>>> > > > > > >>>>>>>> > > > > > >>>>>>>> > > > > > >>>>>>>> > > > > > >>>>>>>> On Wed, Apr 16, 2014 at 11:58 AM, Carlos Santana < > > > > > >>>>> csantana23@gmail.com > > > > > >>>>>>>>> wrote: > > > > > >>>>>>>> > > > > > >>>>>>>>> I was going to suggest node_modules but I think it > doesn't > > > work > > > > > >>>> for > > > > > >>>>>> us > > > > > >>>>>>>>> since we have two top level npm pacakges. If one top > level > > > npm > > > > > >>>>>> pacakge > > > > > >>>>>>> in > > > > > >>>>>>>>> the repo then its fine. > > > > > >>>>>>>>> > > > > > >>>>>>>>> |cli > > > > > >>>>>>>>> | '-package.json > > > > > >>>>>>>>> | '-node_modules/util_a > > > > > >>>>>>>>> |plugman > > > > > >>>>>>>>> | '-package.json > > > > > >>>>>>>>> | '-node_modules/util_a > > > > > >>>>>>>>> > > > > > >>>>>>>>> means "util_a" will be duplicated in repo > > > > > >>>>>>>>> plugman/node_modules/util_a > > > > > >>>>>>>>> cli/node_modules/util_a > > > > > >>>>>>>>> > > > > > >>>>>>>>> or > > > > > >>>>>>>>> if you have > > > > > >>>>>>>>> node_module/util_a at the root, npm link > > > ../node_modules/util_a > > > > > >>>>> still > > > > > >>>>>>>> needs > > > > > >>>>>>>>> to be done for cli and plugman node modules. > > > > > >>>>>>>>> > > > > > >>>>>>>>> that's why I suggested to do the node_modules at > > dev/publish > > > > > >>> time > > > > > >>>>> to > > > > > >>>>>>>>> populate the both node_modules one for cli and one for > > > plugman > > > > > >>>>>>>>> > > > > > >>>>>>>>> Or maybe I missed something. > > > > > >>>>>>>>> > > > > > >>>>>>>>> The tag for smaller modules, might be tricky but at the > > same > > > > > >>> time > > > > > >>>>> not > > > > > >>>>>>>>> necessary if they are consider bundle/private and living > in > > > > > >>> same > > > > > >>>>> repo > > > > > >>>>>>>>> > > > > > >>>>>>>>> Thanks Brian for putting the question out there on > twitter > > > > > >>>>>> interesting > > > > > >>>>>>>>> feedback. > > > > > >>>>>>>>> > > > > > >>>>>>>>> --Carlos > > > > > >>>>>>>>> > > > > > >>>>>>>>> > > > > > >>>>>>>>> On Wed, Apr 16, 2014 at 2:10 PM, Brian LeRoux < > b@brian.io> > > > > > >>>> wrote: > > > > > >>>>>>>>> > > > > > >>>>>>>>>> I thought the node_modules comment might have been > cheeky. > > > > > >>>>>>> (Suggesting > > > > > >>>>>>>> we > > > > > >>>>>>>>>> use npm to manage deps.) > > > > > >>>>>>>>>> > > > > > >>>>>>>>>> Crap. Totally forgot about Good Friday. I have a one > hour > > > > > >>>> window > > > > > >>>>>> open > > > > > >>>>>>>> on > > > > > >>>>>>>>>> Thu. =( > > > > > >>>>>>>>>> > > > > > >>>>>>>>>> > > > > > >>>>>>>>>> On Wed, Apr 16, 2014 at 10:51 AM, Mark Koudritsky < > > > > > >>>>>> kamrik@google.com > > > > > >>>>>>>> > > > > > >>>>>>>>>> wrote: > > > > > >>>>>>>>>> > > > > > >>>>>>>>>>> The tip about placing the deps under node_modules right > > > > > >>> away > > > > > >>>>>> sounds > > > > > >>>>>>>>> very > > > > > >>>>>>>>>>> useful. This way the dev environment will be ready > right > > > > > >>>> after > > > > > >>>>>> git > > > > > >>>>>>>>> clone; > > > > > >>>>>>>>>>> npm install with no extra magic. > > > > > >>>>>>>>>>> > > > > > >>>>>>>>>>> This Friday is a holiday in Canada (Good Friday). > > > > > >>>>>>>>>>> > > > > > >>>>>>>>>>> > > > > > >>>>>>>>>>> On Wed, Apr 16, 2014 at 1:45 PM, Steven Gill < > > > > > >>>>>>> stevengill97@gmail.com > > > > > >>>>>>>>> > > > > > >>>>>>>>>>> wrote: > > > > > >>>>>>>>>>> > > > > > >>>>>>>>>>>> Git tags are not something we have talked about yet. > > > > > >>> Thanks > > > > > >>>>> for > > > > > >>>>>>>>> sharing > > > > > >>>>>>>>>>>> Brian! > > > > > >>>>>>>>>>>> > > > > > >>>>>>>>>>>> > > > > > >>>>>>>>>>>> > > > > > >>>>>>>>>>>> > > > > > >>>>>>>>>>>> On Wed, Apr 16, 2014 at 10:39 AM, Brian LeRoux < > > > > > >>> b@brian.io > > > > > >>>>> > > > > > >>>>>>> wrote: > > > > > >>>>>>>>>>>> > > > > > >>>>>>>>>>>>> hey guys could we add Fri to that doodle? > > > > > >>>>>>>>>>>>> > > > > > >>>>>>>>>>>>> > > > > > >>>>>>>>>>>>> I asked around for opinions and got some interesting > > > > > >>>>>> responses > > > > > >>>>>>> to > > > > > >>>>>>>>> add > > > > > >>>>>>>>>>> to > > > > > >>>>>>>>>>>>> the discussion: > > > > > >>>> https://twitter.com/brianleroux/status/456242928298381312 > > > > > >>>>>>>>>>>>> > > > > > >>>>>>>>>>>>> (Nothing really negative or positive.) > > > > > >>>>>>>>>>>>> > > > > > >>>>>>>>>>>>> > > > > > >>>>>>>>>>>>> On Apr 15, 2014 6:34 PM, "Andrew Grieve" < > > > > > >>>>>> agrieve@chromium.org > > > > > >>>>>>>> > > > > > >>>>>>>>>> wrote: > > > > > >>>>>>>>>>>>> > > > > > >>>>>>>>>>>>>> We didn't have time to cover this today, but I think > > > > > >>>> it's > > > > > >>>>>>>> better > > > > > >>>>>>>>>> off > > > > > >>>>>>>>>>>>>> as its own hangout anyways. > > > > > >>>>>>>>>>>>>> > > > > > >>>>>>>>>>>>>> Created a doodle for Wed/Thurs. Add yourself if > you'd > > > > > >>>>> like > > > > > >>>>>> to > > > > > >>>>>>>>>>>>>> participate in the discussion. > > > > > >>>>>>>>>>>>>> > > > > > >>>>>>>>>>>>>> http://doodle.com/uvyr9454pvepz3a3 > > > > > >>>>>>>>>>>>>> > > > > > >>>>>>>>>>>>>> On Tue, Apr 15, 2014 at 11:19 AM, Mark Koudritsky < > > > > > >>>>>>>>>> kamrik@google.com > > > > > >>>>>>>>>>>> > > > > > >>>>>>>>>>>>>> wrote: > > > > > >>>>>>>>>>>>>>> A short proposal< > > > > > >>> > > > > > > > > > > > > > > > https://docs.google.com/document/d/1GVtG6BD266dqRURKaS-GEDefb0tBYt56acxrJEKAfmE/edit > > > > > >>>>>>>>>>>>>>> > > > > > >>>>>>>>>>>>>>> for > > > > > >>>>>>>>>>>>>>> how to rearrange cli and plugman code. Let's > > > > > >>> discuss > > > > > >>>> it > > > > > >>>>>>>> during > > > > > >>>>>>>>>> the > > > > > >>>>>>>>>>>>>> hangout > > > > > >>>>>>>>>>>>>>> today. Feel free to comment. > > > > > >>>>>>>>> > > > > > >>>>>>>>> > > > > > >>>>>>>>> > > > > > >>>>>>>>> -- > > > > > >>>>>>>>> Carlos Santana > > > > > >>>>>>>>> > > > > > >>>>>>> > > > > > >>>>>>> > > > > > >>>>>>> > > > > > >>>>>>> -- > > > > > >>>>>>> Carlos Santana > > > > > >>>>>>> > > > > > >>>> > > > > > >>>> > > > > > >>>> -- > > > > > >>>> Victor Adrian Sosa Herrera > > > > > >>>> IBM Software Engineer > > > > > >>>> Guadalajara, Jalisco > > > > > >> > > > > > >> > > > > > >> > > > > > >> -- > > > > > >> Victor Adrian Sosa Herrera > > > > > >> IBM Software Engineer > > > > > >> Guadalajara, Jalisco > > > > > > > > > > > > > > > > > > > > > -- > > > Victor Adrian Sosa Herrera > > > IBM Software Engineer > > > Guadalajara, Jalisco > > > > > > --047d7bdc0a564d169304f74355cb--