[PATCH] Add --verbose to all tools

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Add --verbose to all tools

Holger Freyther
Hi all,

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?

regards
  holger

_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

0001-Add-verbose-to-various-tools.patch (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Add --verbose to all tools

Paolo Bonzini-2
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


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk