commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russel Winder <russel.win...@concertant.com>
Subject Re: [cli] Are there any 1.0 -> 1.1/1.2-SNAPSHOT upgrade notes
Date Wed, 04 Jun 2008 06:34:14 GMT
On Tue, 2008-06-03 at 23:25 +0100, sebb wrote:
> On 03/06/2008, Emmanuel Bourg <ebourg@apache.org> wrote:
> > Russel Winder a écrit :
> >
> > > Actually I think that will give [ 'source=1.5' , 'target=1.5'] but that
> > > is fine.
> >
> >  The withValueSeparator() method splits the value on the equal sign, that's
> > why the option receives the values 'source' and '1.5' instead of
> > 'source=1.5'.

Ah, OK.  That works for me :-)

> > > This is the 1.0 semantics I think.  I guess the question is why did the
> > > semantics get changed, there must have been a rationale.
> >
> >  I'm almost convinced this was a mistake. I dug into the Subversion history
> > and the collection of Options in the CommandLine class was changed to a Set
> > (thus forcing only one occurrence for each option) in a patch attached to
> > CLI-13. This issue was about getOptionValue() not working with the long
> > option name, it had nothing to do with the semantic of the number of
> > arguments.
> 
> I agree it seems most likely it was a mistake.
> 
> If a behaviour change had been intended, then there should have been
> warnings in the release notes.
> 
> And if the behaviour change had been documented, I would have expected
> the release vote to generate a few -1s ...

This would indicate then that announcing that 1.1 is rescinded and that
the semantics revert to 1.0 semantics in 1.2 would be a good move.  For
anyone who actually uses 1.1 and knows about this then they are not
using it as it breaks command line parsing!

Is there ever a case where you want to specify the number of instances
of an option?  I would say it is a choice between 0, 1, or any number of
occurrences.  On the other hand having an option -Xa,b,c,d where there
must be an exact number seems more useful -- I cannot see this as -X a
-X b -X c -X d but perhaps that was what was trying to be achieved as a
possibility.

PS I think the CLI2 API has got issues very similar to this.

-- 
Russel.
====================================================
Dr Russel Winder                 Partner

Concertant LLP                   t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,              f: +44 8700 516 084
London SW11 1EN, UK.             m: +44 7770 465 077

Mime
View raw message