[squeak-dev] The Trunk: System-dtl.1301.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Feb 3 01:11:49 UTC 2022

David T. Lewis uploaded a new version of System to project The Trunk:

==================== Summary ====================

Name: System-dtl.1301
Author: dtl
Time: 2 February 2022, 8:11:46.843533 pm
UUID: 24bbff66-2d06-47fb-a3fa-4f51eeeff5d4
Ancestors: System-dtl.1298

Do not set the sources stream binary until after the check to verify it is streaming on a .sources file (because some streams do not understand #binary)

=============== Diff against System-dtl.1298 ===============

Item was changed:
  ----- Method: SmalltalkImage>>compressSources (in category 'housekeeping') -----
  	"Copy all the source file to a compressed file. Usually preceded by Smalltalk condenseSources."
  	"The new file will be created in the default directory, and the code in openSources
  	will try to open it if it is there, otherwise it will look for normal sources."
  	"Smalltalk compressSources"
  	| f cfName cf |
+ 	f := SourceFiles first readOnlyCopy.
- 	f := SourceFiles first readOnlyCopy binary.	"binary to preserve utf8 encoding"
  	(f localName endsWith: 'sources')
  		ifTrue: [cfName := (f localName allButLast: 7) , 'stc']
  		ifFalse: [self error: 'Hey, I thought the sources name ended with ''.sources''.'].
+ 	f binary. "binary to preserve utf8 encoding"
  	cf := (CompressedSourceStream on: (FileStream newFileNamed: cfName))
  				segmentSize: 65536 maxSize: f size.
  	"Copy the sources"
  'Compressing Sources File...'
  	displayProgressFrom: 0 to: f size
  		[:bar | f position: 0.
  		[f atEnd] whileFalse:
  			[cf nextPutAll: (f next: 65536).
  			bar value: f position]].
  	cf close.
  	self setMacFileInfoOn: cfName.
  	self inform: 'You now have a compressed sources file!!
  Squeak will use it the next time you start.'!

More information about the Squeak-dev mailing list