More problems with condenseSources

Dan Ingalls Dan at SqueakLand.org
Tue Apr 11 21:55:40 UTC 2006


Andreas Raab <andreas.raab at gmx.de> wrote...

>I just noticed that after executing #condenseSources the sources file was very subtly broken. Digging into the issue I discovered the bug reported at http://bugs.impara.de/view.php?id=3458
>
>I'm posting this here too, since I need at least a workaround for this issue. Any ideas?

Hi, Andreas -

I don't have a good test-bed for this problem, but I suggest the following workaround...

In method
	PositionableStream>>copyPreamble: preamble from: aStream at: pos
replace...
	(i _ last50 findLastOccuranceOfString: 'stamp:' startingAt: 1) > 0 ifTrue:
		[stamp _ (last50 copyFrom: i+8 to: last50 size) copyUpTo: $'].
with...
	(i _ last50 findLastOccuranceOfString: 'stamp:' startingAt: 1) > 0 ifTrue:
		[stamp _ (last50 copyFrom: i+8 to: last50 size) copyUpTo: $'.
		"Catch the most likely invalid stamp..."
		(stamp includes: $!) ifTrue: [stamp _ String new]].

Hope this helps.

	- Dan

PS:  It's not a method to be proud of (that's why I felt compelled to respond ;-) but, since it's been around for a looong time, it may be that this workaround is good enough to be included as a bug fix.



More information about the Squeak-dev mailing list