On 01/03/2012, at 3:32 PM, Daz DeBoer wrote:

> Hi guys
> 
> Following our discussion from yesterday, I was thinking that maybe a review 
> of the gradle CLI might be good for RC1.
> 
> A: The main issue is the '--refresh dependencies' option looks bad when 
> combined with the 'dependencies' task. But this would equally apply to 
> 'gradle --cache rebuild rebuild' (if rebuild was a task name).
>          - These are the only 2 options we have that take 'multi-choice' 
> arguments. All others take user-supplied arguments (like file names) or no 
> arguments. 
>          - Actually '--exclude integTest' only avoids this issue since you 
> never want explicitly execute the task you're excluding ("--exclude integTest 
> integTest" doesn't make sense!)
> Options:
> 1) Keep things as they are.
> 2) Deprecate the use of '--OPTION <space> argument' and encourage '--OPTION = 
> argument'. We could keep the ability to do '-O argument', but force the '=' 
> when using the --long-option format.
>     - This would allow us to eventually make the argument optional: eg 
> '--refresh', '--refresh=dependencies', '--refresh=task-uptodate'
> 3) Add a new pattern for a 'multi-choice' option, and switch to the syntax 
> of: '--refresh-dependencies', '--cache-rebuild'
>     - We could add these individually to start with, but later add a better 
> way to describe these in the CLI help (when we have more than a couple of 
> choices).
> 
> B: I'd also like to see is consolidation of the '--cache rebuild' and 
> '--refresh dependencies' options. (I really don't like --cache rebuild)
> Options:
> 1) Keep things as they are: (--refresh=dependencies & --cache=rebuild)
> 2) Deprecate --cache=rebuild and reuse '--refresh':
>     --refresh=task-cache
>     --refresh=task-state
>     --refresh=cached-task-state
>     --refresh=uptodate-state
>     --refresh=uptodate-cache
> 3) A new option entirely
> ????
> 
> My vote would be for A3 and B2, so we'd have '--refresh-dependencies' and 
> '--refresh-task-cache' as separate options to start with, later adding the 
> concept of a '--refresh' option with different '-switch' sub-options

I'm not keen at all on --refresh=«». I'd prefer distinct options, i.e. 
--refresh-task-cache, --refresh-task-state.

The = thing doesn't make sense to me and seems awkward. I can see a kind of 
conciseness argument, but that doesn't outweigh the awkwardness to me.

I'm a bit sensitive on this topic though as I have a strong dislike of 
cryptic/awkward CLI interfaces.

-- 
Luke Daley
Principal Engineer, Gradleware 
http://gradleware.com

Reply via email to