Writing notifications to stdout (was Re: [squeak-dev] Re: New release candidate: 4.4-12324)

Frank Shearar frank.shearar at gmail.com
Wed Jan 2 22:35:34 UTC 2013


On 28 December 2012 17:48, David T. Lewis <lewis at mail.msen.com> wrote:
> On Thu, Dec 27, 2012 at 11:34:32AM +0000, Frank Shearar wrote:
>> On 27 December 2012 11:00, H. Hirzel <hannes.hirzel at gmail.com> wrote:
>> > Frank,
>> >
>> > where can I have a look at the build script?
>> >
>> > And the console output is not very talkative....
>> >
>> > http://squeakci.org/job/ReleaseSqueakTrunk/17/console
>>
>> * https://github.com/frankshearar/squeak-ci/blob/download-vms/release.sh
>> * https://github.com/frankshearar/squeak-ci/blob/download-vms/release.st
>>
>> No, the scripts are not talkative at all. I'm really not sure how to
>> make them more talkative. Obviously in the shell scripts you can use
>> echo, but those do hardly anything. Really what I want is something
>> that writes to the Transcript when headful and to stdout/stderr when
>> headless. I don't think we have such a thing at the moment.
>
> Try something like this in your Smalltalk scripts:
>
>   "Define a block to take a single string parameter and write a message
>   to both the console stdout and to the Transcript"
>   log := [:msg | | str |
>         str := DateAndTime now printString, ': ', msg.
>         FileStream stdout nextPutAll: str; nextPut: Character lf; flush.
>         Transcript cr; show: str].
>
>   "Then sprinkle the rest of your script with things like this"
>   log value: 'Begin loading my package from SqueakSource'.
>
>   log value: 'My package is loaded now'.

I think what I'm after is something like Pharo's headless UIManager,
actually. The ReleaseSqueakTrunk build is hanging right now and
there's no indication why. If I run the build script locally I can
remove the -vm-display-null stuff and see the "Cleaning packages"
progress bar, and so on. If I could hook into _that_, things would
become a whole lot easier to debug. That, and having a script fail and
log to stdout instead of bringing up a Debugger.

I think I'll add that to the 4.5 wish list!

frank

> Dave
>
>


More information about the Squeak-dev mailing list