cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian LeRoux...@brian.io>
Subject Re: Sharing code between plugman and cordova-cli
Date Fri, 11 Apr 2014 00:05:19 GMT
More on this approach:

http://blog.izs.me/post/48281998870/unix-philosophy-and-node-js
https://blog.nodejitsu.com/the-nodejs-philosophy/
http://substack.net/how_I_write_modules


On Fri, Apr 11, 2014 at 10:04 AM, Brian LeRoux <b@brian.io> wrote:

> I want more repos not less! I'd love for us to break the functionality up
> into a tonne of smaller utility repos. Ideally every module is in a
> discreet git repo, separately versioned, and dependencies are managed with
> npm.
>
>
> On Fri, Apr 11, 2014 at 5:59 AM, Michal Mocny <mmocny@chromium.org> wrote:
>
>> The overhead of a third repo scares me.  I'm fine with merging into a
>> single repo, but I'll throw a third option into the mix:
>>
>> - Leave the plugman repo, and leave the plugman binary in there, but
>> refactor to make plugman depend on cordova-cli, and forward all
>> functionality to cli implementations.
>>
>> This leaves the APIs entirely untouched and is just an internal refactor.
>>  It would invert the "depends" direction, but I don't think that matters.
>>
>> -Michal
>>
>>
>> On Thu, Apr 10, 2014 at 2:53 PM, Mark Koudritsky <kamrik@google.com>
>> wrote:
>>
>> > I often find myself making changes that require commits to both plugman
>> and
>> > cli, it's not always clear which repo new code should live in and
>> sharing
>> > utility functions between the two projects is not trivial.
>> >
>> > The idea of "cordova-lib" was mentioned several times on this mailing
>> list.
>> > The lib would contain most of the code from both plugman and cli while
>> the
>> > end tools will be thin wrappers around the lib.
>> >
>> > I wanted to probe how people working on CLI feel about such
>> rearrangement.
>> >
>> > But if we are already in this discussion, now that the heavy platforms
>> > files are distributed separately from cordova-cli (repos like
>> cordova-ios
>> > etc), is there anything that prevents us from merging plugman and cli
>> into
>> > a single npm package with 2 executables?
>> >
>> >
>> > Examples of code that should be shared include:
>> > - Common logging and error handling logic (e.g. CordovaError exception)
>> > - Fetching logic (for plugins and platforms)
>> > - Platform-specific logic (e.g. where the config.xml file lives within
>> each
>> > project)
>> > - Generic utilities like xml-helpers.js (currently copied but slightly
>> > diverged in the 2 repos)
>> >
>> > The first option that comes to mind is to create another repo and
>> another
>> > npm package for cordova-lib, but this creates significant overhead:
>> >  - Version release would get more difficult (see the failed release vote
>> > thread <
>> https://www.mail-archive.com/dev@cordova.apache.org/msg15419.html
>> > >from
>> > last Friday)
>> >  - In many cases new functionality in plugman or CLI would require
>> changes
>> > in 2 or even 3 repos. This is a significant additional barrier for new
>> > contributors that don't have commit rights - coordinating two
>> > interdependent pull request is quite a hassle.
>> >  - Strictly speaking, cordova-lib major version number will have to be
>> > bumped every time we change some function signatures, which will happen
>> > rather frequently in this case (this point also partially holds true if
>> the
>> > lib will be part of the plugman repo and npm package).
>> >
>> > Based on the points above a single repo and npm package containing both
>> > plugman and cli seems to provide the most benefit.
>> >
>> > What do you think?
>> >
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message