The Inbox: System-ct.1529.mcz

[email protected] Sun, 2 Aug 2026 19:55:40 0000
Newsgroups gmane.comp.lang.smalltalk.squeak.general
Message-ID <[email protected]>
Christoph Thiede uploaded a new version of System to project The Inbox:
http://source.squeak.org/inbox/System-ct.1529.mcz

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

Name: System-ct.1529
Author: ct
Time: 2 August 2026, 9:55:38.448348 pm
UUID: c6c7e664-1290-47f3-87ab-fcec7e2a92ef
Ancestors: System-ct.1528

Relaxes an error handler for DoItFirst --file that prevented the compilation of any unknown selectors, which nowadays raises UnknownSymbolNotification.

	$ cat > test.st <<EOF
	'From Squeak6.1rc2 of 2 August 2026 [latest update: #23945] on 2 August 2026 at 9:38:14 pm'!
	
	!Object methodsFor: 'accessing' stamp: 'ct 8/2/2026 21:38'!
	newselector
	        ^self! !
	EOF
	$ squeak squeak/FreshTrunk.image --file ../test.st
	UnknownSymbolNotification: 

Dave, does this fix look right for you? Looking at the history of this method, originally, only a FileDoesNotExistException was caught, before you changed it in System-dtl.1201 to Exception to catch further errors during stdio accessing. But I think catching bare Exceptions instead of Error is almost always a bad pattern, since it will catch many harmless notifications, too.

If Dave finds this okay, do we want to merge this into the release candidate? Avoiding a broken --file in a kind-of top-level interface in the release would be nice. :-)

=============== Diff against System-ct.1528 ===============

Item was changed:
  ----- Method: DoItFirst>>evaluateFileContents: (in category 'actions') -----
  evaluateFileContents: fileName
  	"Evaluate the contents of a file and print the result on stdout, or error
  	message on stderr. Exit immediately without saving the image."
  
  	| fs arg |
  	[fs := FileStream oldFileNamed: fileName.
  	[arg := fs contentsOfEntireFile.
  	^ self evaluateOption: arg]
  			ensure: [fs close]]
+ 		on: Error
- 		on: Exception
  		do: [:ex | (self printError: ex asString)
  				ifTrue: [Smalltalk quitPrimitive]].!

Squeak-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]