On Apr 17, 2009, at 5:36 PM, Russel Winder wrote:
On Fri, 2009-04-17 at 16:19 +0200, Hans Dockter wrote:
With the new resolver notation all the paramter are named via the map
notation. Name is now optional.
For flatDir you either have to specify rootDir or rootDirs. The first
takes a single argument the second one a list.
flatDir(rootDir: "$path")
flatDir(rootDirs: ["$path1", "$path2"]
why not put the hard work in the code and have:
flatDir ( dirs : aPath )
flatDir ( dirs : [ aPath, anotherPath ] )
This makes things easier for the user, albeit harder for the
implementer.
SCons is very good about this sort of genericism. As indeed is Waf.
Waf actually goes further and allows:
flatDir ( dirs : "${aPath} ${anotherPath}" )
Excellent idea. This is now committed to trunk (all the other
proposals as well).
of course this is just the string case with split applied to get a
list.
The objective for having two parameters is that a single root dir is
so common, that we want to save our users the list notation in this
case. Of course we could have one parameter and accept normal objects
and lists and then figure this out. But how should we name this
parameter in regard to the singular/plural here. Thought?
Minimizing the number of takens and cases the user needs to remember
is
probably the best thing. Make everything as generic as possible and
put
the hard work in the infrastructure.
Should we call the parameter rootDir (as it is now) or just dir?
dirs or directories
I am not a great fan of shortening things to save typing. If the
keyword is a word then best to use the word.
I usually also like real words. 'dir' is a special animal. We are
using 'dir' in many other places. I think in this case 'dir' is OK.
mavenRepo(rootRepo: "$url1", jarOnlyRepos: ["$url1", "$url2"])
Should we call the parameters rootRepo and jarOnlyRepos, or should we
call them root and jarOnly?
Without knowing the semantics it is a bit hard to tell. What is a
root
and what is a JarOnly?
As setting the jarOnlyRepos is not that common, there is no singular
version of this parameter.
I would get rid of all singular things and have only plurals.
Singular
is a special case that everyone uses all the time but the
infrastructure
should Just Work (tm).
I agree.
- Hans
--
Russel.
============================================================
Dr Russel Winder Partner
Concertant LLP t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road, f: +44 8700 516 084 voip:
sip:[email protected]
London SW11 1EN, UK. m: +44 7770 465 077 xmpp: [email protected]
--
Hans Dockter
Gradle Project lead
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email