[squeak-dev] Re: too much logging

Eliot Miranda eliot.miranda at gmail.com
Fri May 2 16:50:06 UTC 2014


2014-05-02 9:11 GMT-07:00 Eliot Miranda <eliot.miranda at gmail.com>:

> Hi Colin, Hi All,
>
>     if in 4.5 one tries to evaluate a doit somewhere in a verdant
> transcript, one containing much content, then too much logging will occur
> to the changes file.  Instead of the selected doit being logged, the entire
> contents of the transcript up to the end of the doit will be logged, and
> that can cause parse errors when recovering changes.
>
> So how best to solve this?  Here are some ideas and I wanted to ask
> people's opinion
>
> - have CompilationCue remember the position of the source stream and
> instead of using "source contents" in streamToLog use "source position;
> upToEnd"
>
> - have Parser/Scanner remember the characters parsed in a buffer and take
> them from there
>
> - change ReadWriteStream to remember its initial position so that when one
> says
>     (ReadWriteStream on: (String withAll: ((0 to: 255) collect: [:n| n
> asCharacter]))
>         from: $A asInteger + 1 to: $Z asInteger + 1) contents
> one gets 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
> instead of
>  '
>  !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ'
>
> IMO the last option is the right thing to do but it feels like a big
> change.
>

and indeed implementing the latter doesn't break anything in the standard
test suite.  I'm committing the fix plus some tests.
-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140502/31c52449/attachment.htm


More information about the Squeak-dev mailing list