cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Grieve <agri...@chromium.org>
Subject Re: Platform-level command line scripts ;)
Date Thu, 21 Mar 2013 23:11:33 GMT
On Thu, Mar 21, 2013 at 6:51 PM, Filip Maj <fil@adobe.com> wrote:

> It looks like we are split between Reductionist (four commands and/or less
> commands) and.. The opposite.. Of reductionists? Antireductionist?
>
> Two points I think supporting the antireductionist argument:
>
> 1. number of scripts being an issue because of possible bug repetition
> across scripts is put to bed by refactoring common functionality into
> sub-scripts.
>
You could make more scripts as helper scripts, but I still think that it
will be confusing if a user types "ls" and sees a large number of scripts,
having to guess what each of them does.

Having fewer scripts that you can --help on would be more discoverable.
Having extra helper scripts that are not meant to be run directly by users
would make discoverability even worse (I want to package, so do I run
build-release first? do I need to run build-clean first? what about
build-helpers?)

I don't think having more scripts will make it more likely that the scripts
will be consistent across platforms. E.g. build-release and build-debug vs.
build --release build --debug. In the end, there's the same number of
discrete operations that we must make consistent.



> 2. more "generic" scripts have been problematic before because of
> complicated workflows for some of them (like Anis points out for `run`)
> and unstandardized defaults across platforms. I saw this problem at the
> hack night last night, where people were confused as to the behavior of
> `emulate` (does it always start a new emulator? Does it load my app onto
> the emulator too?).
>
I don't think standardizing the commands is made easier / harder by the #
of scripts.




>
> We have all agreed on the default implementation for all of these scripts,
> however we split them out, to be: error out.
>
> Additionally and to Brian's point, more complex workflows can be built up
> by using the baseline scripts we are trying to define here. Nothing
> stopping us from composing a new `debug` script (or remember `BOOM` in
> cordova-android?) once we have the baseline functionality sorted.
>
> It comes down to two commands currently in contention:
>
> 1. `build`. It's either split this up into `build-debug` and
> `build-release` or `build --debug` and `build --release` with debug being
> default.
> 2. `run`. We are actually aiming to combine the existing `debug` and
> `emulate` commands into this one new `run` one, which I think actually
> exacerbates the problem we are trying to solve here.
>
> Should we start a separate vote thread?
>
> On 3/21/13 12:32 PM, "Brian LeRoux" <b@brian.io> wrote:
>
> >Ya tend to agree w/ the workflows you describe Jesse. Not at the
> >exlusion of discreet scripts however. We probably should have small
> >focused scripts and then compose the workflow scripts from them.
> >(Making it easier to test and compose new scripts and tooling.)
> >
> >
> >
> >On Thu, Mar 21, 2013 at 12:07 AM, Jesse <purplecabbage@gmail.com> wrote:
> >> renaming stuff is easy.
> >>
> >> Does it make sense to log without running? or does log also launch?
> >>where?
> >> Sounds to me like logging is an option attached to a run command.
> >> What is the point of cleaning if you're not going to build right after?
> >> trying to free up hard drive space? anal much? or is clean just a build
> >> option?
> >>
> >> The current state of WP7+WP8
> >>
> >> Every WP7 and WP8 cordova project that you create with the create
> >>script,
> >> or with the template has a debug and an emulate command.
> >> debug    : builds and runs on the attached device.
> >> emulate : builds and runs on the first emulator, starting it if it was
> >>not
> >> already running
> >>
> >>
> >>
> >>
> >> @purplecabbage
> >> risingj.com
> >>
> >>
> >> On Wed, Mar 20, 2013 at 8:22 PM, Benn Mapes <benn.mapes@gmail.com>
> >>wrote:
> >>
> >>> I liked the idea you mentioned earlier with having one wrapper script,
> >>> that way there is one entry point for the given commands for the needed
> >>> functionality. Then it doesn't matter what underlying scripts actually
> >>>do
> >>> the work.
> >>>
> >>> Then our only focus would be on the commands and not so much the name
> >>>of
> >>> the scripts.
> >>>
> >>>
> >>> On Wed, Mar 20, 2013 at 7:36 PM, Andrew Grieve <agrieve@chromium.org>
> >>> wrote:
> >>>
> >>> > I really like Anis's suggestion of just four scripts. What's the
> >>> motivation
> >>> > for having many scripts? Having fewer will dramatically reduce copy
&
> >>> paste
> >>> > bugs. It will also aid discoverability (since you'll get --help
> >>>instead
> >>> of
> >>> > just "ls" and infer from the name what they do).
> >>> >
> >>> >
> >>> > On Wed, Mar 20, 2013 at 7:06 PM, Filip Maj <fil@adobe.com> wrote:
> >>> >
> >>> > > Ya ya ya we're all on agreement on this specific issue. The
> >>>underlying
> >>> > > platform scripts can be used regardless of whether you're using
> >>> > > cordova-cli or not.
> >>> > >
> >>> > > On 3/20/13 3:51 PM, "Anis KADRI" <anis.kadri@gmail.com>
wrote:
> >>> > >
> >>> > > >On Wed, Mar 20, 2013 at 3:43 PM, Benn Mapes <benn.mapes@gmail.com
> >
> >>> > wrote:
> >>> > > >
> >>> > > >> I know that sounds
> >>> > > >> like a lot
> >>> > > >> of scripts but we're building them for the cordova-cli
to use,
> >>>so i
> >>> > > >>like
> >>> > > >> the idea of breaking
> >>> > > >>  them out so each script does a *very specific* task
with as
> >>> > > >>little-to-no
> >>> > > >>
> >>> > > >
> >>> > > >No we're not. cordova-cli is a cool tool that people can use
but
> >>>it
> >>> > should
> >>> > > >not be the only way of building Cordova apps in my opinion.
> >>> > >
> >>> > >
> >>> >
> >>>
>
>

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