[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] [PATCH] Add --verbose to all tools
From: |
Paolo Bonzini |
Subject: |
Re: [Help-smalltalk] [PATCH] Add --verbose to all tools |
Date: |
Tue, 04 May 2010 16:46:03 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.4 |
On 05/04/2010 07:32 AM, Holger Hans Peter Freyther wrote:
I found it useful to be able to pass -V/-v/--verbose to all of the
tools. The patch is implemented it in the brute force way. I wonder if a
patch to create a base for the tools and common option handling would be
appreciated?
Yes, possibly following the option parsing code in the
scripts/Package.st file, where the main body of the file is just
[ PackageManager new
parseArguments: Smalltalk arguments;
run
]
on: Error
do: [ :ex |
('gst-package: ', ex messageText, '
') displayOn: stderr.
ex pass. ObjectMemory quit: 1 ].
There is one ugly nit however. scripts/Package.st must not require any
package. So you cannot just put a superclass of PackageManager into a
package "Tools".
I suppose you could put the code into scripts/Common.st and load it from
gst-tool.c instead (using gst_process_file like it does already for the
other scripts/*.st file).
I'll merge the patch soon.
Paolo