From patrick.bennett at inin.com Tue Mar 22 18:01:45 2005 From: patrick.bennett at inin.com (Patrick Bennett) Date: Tue Mar 22 17:57:02 2005 Subject: [Rake-devel] Option parsing Message-ID: <4240A3D9.9000303@inin.com> Jim, do you have any plans to switch rake to use optparse for option parsing? The current use of optparse, as well as the insistence that *all* options have long *and* short options is proving to be kind of limiting. There are a number of options I'd like to add (logging options for one) for my own purposed that I'd like to simply be --long options only as coming up with variations of single letter equivalents just makes it too confusing to the user. The current rake setup doesn't allow this. I think the current requirement that everything be in a long/short options array is partly to provide 'help,' but optparse also happens to handle that really well already. :) Cheers, Patrick Bennett From jim at weirichhouse.org Tue Mar 22 18:45:51 2005 From: jim at weirichhouse.org (Jim Weirich) Date: Tue Mar 22 18:41:49 2005 Subject: [Rake-devel] Option parsing In-Reply-To: <4240A3D9.9000303@inin.com> References: <4240A3D9.9000303@inin.com> Message-ID: <200503221845.51581.jim@weirichhouse.org> On Tuesday 22 March 2005 06:01 pm, Patrick Bennett wrote: > Jim, do you have any plans to switch rake to use optparse for option > parsing? It's not on my list of things to do on rake, but you raise some good points. Are you thinking about the ability of a Rakefile to specify additional options? That would be interesting. -- -- Jim Weirich jim@weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas) From patrick.bennett at inin.com Tue Mar 22 18:53:17 2005 From: patrick.bennett at inin.com (Patrick Bennett) Date: Tue Mar 22 18:48:33 2005 Subject: [Rake-devel] Option parsing In-Reply-To: <200503221845.51581.jim@weirichhouse.org> References: <4240A3D9.9000303@inin.com> <200503221845.51581.jim@weirichhouse.org> Message-ID: <4240AFED.7040801@inin.com> Jim Weirich wrote: > It's not on my list of things to do on rake, but you raise some good > points. > >Are you thinking about the ability of a Rakefile to specify additional >options? That would be interesting. > > Not specifically, but it 'could' be interesting. Right now I have it so that any x=y options [actually didn't you add this?] on the command line are set in the rakefiles environment, so rakefile's can simply do ENV['xxxxx'] checks and have it work whether set through the environment or the command-line. I've also added a number of commands specific to the entire build system I've built up around rake ('vaguely' similar in some of the concepts to boost.build/jam). I think I posted some messages about it months ago but there was little to no discussion about it. I've probably got the need for about 6 additional options right now, and having to specify all of them as having short aliases makes for a pretty confusing option list. I've added a fair bit to the base rake.rb file actually. It's questionable how much would be generally applicable to the base 'rake' project though. Patrick Bennett