Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1355.mcz
==================== Summary ====================
Name: System-mt.1355
Author: mt
Time: 8 June 2022, 9:29:18.447101 am
UUID: fddf7561-4fb7-1a4d-9040-3007d78dedf2
Ancestors: System-mt.1354
Quickfix for making image-segment loading work again for image formats 68533 and 7033. See commentary.
=============== Diff against System-mt.1354 ===============
Item was changed:
----- Method: NativeImageSegment>>loadSegmentFrom:outPointers: (in category 'read/write segment primitives') -----
loadSegmentFrom: segmentWordArray outPointers: outPointerArray
"Load segmentWordArray into the memory. Adapt the primitive to the new API, which is to answer the array of loaded objects, the first of which should be the array of roots. The primitive will install a binary image segment and return as its value the array
of roots of the tree of objects represented. Upon successful completion, the
wordArray will have been becomed into anArray of the loaded objects. So simply answer the segmentWordArray which will have becommed."
| segmentFormat |
segmentFormat := self segmentFormatFrom: segmentWordArray first.
+ self flag: #discuss. "mt: Should the version for image segments consider or ignore that extra flag for multiple byte-code sets? See primitive 98 or #storeSegmentFor:into:outPointers:."
+ segmentFormat = (Smalltalk imageFormatVersion bitClear: 512 "MultipleBytecodeSetsBitmask") ifTrue:
- segmentFormat = Smalltalk imageFormatVersion ifTrue:
[^(self primitiveLoadSegmentFrom: segmentWordArray outPointers: outPointerArray)
ifNil: [self error: 'segment load failed']
ifNotNil: [segmentWordArray]].
segmentFormat >= 68000
ifTrue:
[Smalltalk wordSize = 4 ifTrue:
[^(Spur64BitImageSegmentLoader new loadSegmentFrom: segmentWordArray outPointers: outPointerArray)]]
ifFalse:
[Smalltalk wordSize = 8 ifTrue:
[^(Spur32BitImageSegmentLoader new loadSegmentFrom: segmentWordArray outPointers: outPointerArray)]].
self error: 'segment version unrecognized'!
Tony Garnock-Jones uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-tonyg.262.mcz
==================== Summary ====================
Name: Network-tonyg.262
Author: tonyg
Time: 7 June 2022, 9:32:58.541461 am
UUID: 510fd136-5da5-43a8-93c3-d5adbe439d14
Ancestors: Network-mt.261
I missed a case in Network-tonyg.260. This change fixes connectTo:waitForConnectionFor: in the same way as the previous fix to connectTo:port:waitForConnectionFor:.
=============== Diff against Network-mt.261 ===============
Item was changed:
----- Method: Socket>>connectTo:waitForConnectionFor: (in category 'ipv6') -----
connectTo: aSocketAddress waitForConnectionFor: timeout
self connectNonBlockingTo: aSocketAddress.
self
waitForConnectionFor: timeout
+ ifTimedOut: [ConnectionTimedOut signal: ('Cannot connect to {1}' translated format: {aSocketAddress printString})]
+ ifRefused: [ConnectionRefused signal: ('Cannot connect to {1}' translated format: {aSocketAddress printString})]!
- ifTimedOut: [ConnectionTimedOut signal: ('Cannot connect to {1}' translated format: {aSocketAddress})]
- ifRefused: [ConnectionRefused signal: ('Cannot connect to {1}' translated format: {aSocketAddress})]!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1998.mcz
==================== Summary ====================
Name: Morphic-mt.1998
Author: mt
Time: 3 June 2022, 10:03:38.000381 am
UUID: 50a6fd6c-1405-403a-a99b-7944c2f6ce0a
Ancestors: Morphic-tonyg.1997
For macOS platform, fixes the preference "Legacy keyboard shortcuts (US/UK only)".
Thanks to Tim (tcj) for the pointer!
=============== Diff against Morphic-tonyg.1997 ===============
Item was changed:
----- Method: LegacyShortcutsFilter class>>filterEvent:for: (in category 'event filter') -----
filterEvent: aKeyboardEvent for: textMorph
+
aKeyboardEvent isKeystroke ifFalse: [^ aKeyboardEvent].
aKeyboardEvent commandKeyPressed ifFalse: [^ aKeyboardEvent].
Preferences cmdKeysInText ifFalse: [^ aKeyboardEvent].
+
+ (Smalltalk platformName = 'Mac OS' and: [aKeyboardEvent shiftPressed])
+ ifTrue: ["Work around an issue in the VM where SHIFT is not honored
+ in the KeyChar event's character. This should only be the case for
+ KeyDown events to encode virtual-key presses. The VM should not
+ do this for KeyChar events. Works for U.S. keyboard layout only."
+ aKeyboardEvent keyValue: (
+ aKeyboardEvent keyCharacter caseOf: {
+ [$9] -> [$(]. [$0] -> [$)].
+ [$,] -> [$<]. [$.] -> [$>].
+ [$[] -> [${]. [$]] -> [$}].
+ [$'] -> [$"] }
+ otherwise: [aKeyboardEvent keyCharacter]) asInteger].
+
-
('()[]{}|''"<>' includes: aKeyboardEvent keyCharacter)
ifTrue: [textMorph
handleInteraction: [(textMorph editor enclose: aKeyboardEvent) ifTrue: [aKeyboardEvent ignore]]
fromEvent: aKeyboardEvent].
^ aKeyboardEvent
"
Preferences cmdKeysInText
Preferences cmdGesturesEnabled
Preferences honorDesktopCmdKeys
PasteUpMorph globalCommandKeysEnabled.
"!
Marcel Taeumel uploaded a new version of Installer-Core to project The Treated Inbox:
http://source.squeak.org/treated/Installer-Core-tcj.440.mcz
==================== Summary ====================
Name: Installer-Core-tcj.440
Author: tcj
Time: 5 August 2020, 10:21:54.954624 pm
UUID: b6ac0eda-4db6-4313-b760-50dcdd1dc584
Ancestors: Installer-Core-mt.439
Be more tolerant of a partially-installed or mis-installed Metacello.
=============== Diff against Installer-Core-mt.439 ===============
Item was changed:
----- Method: Installer class>>ensureRecentMetacello (in category 'scripts') -----
ensureRecentMetacello
"Copied and adapted from https://github.com/Metacello/metacello/blob/master/README.md"
| metacello |
((Smalltalk classNamed: #WebClient)
ifNil: [ false ]
ifNotNil: [ :webClient |
[ (webClient httpHead: 'https://github.com') isSuccess ]
on: Error
do: [ false ] ])
ifFalse: [ ^self inform: 'Could not connect to "https://github.com".\\You need an internet connection and SSL support\to install (or update) Metacello.\\Please fix those issues and try again.' translated withCRs ].
self isMetacelloInstalled ifFalse: [
"Prepare a clean environment for it."
+ Smalltalk globals removeKey: #Metacello ifAbsent: [].
- Smalltalk globals removeKey: #Metacello.
"Get the Metacello configuration (for Squeak users)"
Installer gemsource
project: 'metacello';
addPackage: 'ConfigurationOfMetacello';
install.
"Bootstrap Metacello Preview, using mcz files (#'previewBootstrap' symbolic version"
((Smalltalk classNamed: #ConfigurationOfMetacello) project
version: #'previewBootstrap') load].
metacello := Smalltalk classNamed: #Metacello.
"Now load latest version of Metacello"
metacello new
baseline: 'Metacello';
repository: 'github://Metacello/metacello:master/repository';
get.
metacello new
baseline: 'Metacello';
repository: 'github://Metacello/metacello:master/repository';
load: #('default' 'Metacello-Help').
!
Item was changed:
----- Method: Installer class>>isMetacelloInstalled (in category 'scripts') -----
isMetacelloInstalled
+ "Squeak is shipped with the global #Metacello referring to lightweight MetacelloStub. After the first message is sent, the latest Metacello is installed, replacing the stub.
+ Be tolerant of a partially-installed Metacello."
+ ^ (Smalltalk includesKey: #Metacello)
+ and: [(Smalltalk at: #Metacello) ~= MetacelloStub]!
- "Squeak is shipped with the global #Metacello referring to lightweight MetacelloStub. After the first message is sent, the latest Metacello is installed, replacing the stub."
- ^ (Smalltalk at: #Metacello) ~= MetacelloStub!
Marcel Taeumel uploaded a new version of Installer-Core to project The Treated Inbox:
http://source.squeak.org/treated/Installer-Core-lrnp.447.mcz
==================== Summary ====================
Name: Installer-Core-lrnp.447
Author: lrnp
Time: 23 May 2022, 9:42:06.780598 pm
UUID: 329797ae-a3e0-4567-a259-ab491943a3e5
Ancestors: Installer-Core-cmm.446
harden code to recover Metacello in case of error
In #ensureRecentMetacello, Metacello can become removed from the global dictionary if the process is aborted during load, such as by error or user interrupt.
This patch handles absent dictionary lookup exceptions to recover from this state.
=============== Diff against Installer-Core-cmm.446 ===============
Item was changed:
----- Method: Installer class>>ensureRecentMetacello (in category 'scripts') -----
ensureRecentMetacello
"Copied and adapted from https://github.com/Metacello/metacello/blob/master/README.md"
| metacello |
((Smalltalk classNamed: #WebClient)
ifNil: [ false ]
ifNotNil: [ :webClient |
[ (webClient httpHead: 'https://github.com') isSuccess ]
on: Error
do: [ false ] ])
ifFalse: [ ^self inform: 'Could not connect to "https://github.com".\\You need an internet connection and SSL support\to install (or update) Metacello.\\Please fix those issues and try again.' translated withCRs ].
self isMetacelloInstalled ifFalse: [
"Prepare a clean environment for it."
+ Smalltalk at: #Metacello ifPresent: [Smalltalk globals removeKey: #Metacello].
- Smalltalk globals removeKey: #Metacello.
"Get the Metacello configuration (for Squeak users)"
Installer gemsource
project: 'metacello';
addPackage: 'ConfigurationOfMetacello';
install.
"Bootstrap Metacello Preview, using mcz files (#'previewBootstrap' symbolic version"
((Smalltalk classNamed: #ConfigurationOfMetacello) project
version: #'previewBootstrap') load].
metacello := Smalltalk classNamed: #Metacello.
"Now load latest version of Metacello"
metacello new
baseline: 'Metacello';
repository: 'github://Metacello/metacello:master/repository';
get.
metacello new
baseline: 'Metacello';
repository: 'github://Metacello/metacello:master/repository';
load: #('default' 'Metacello-Help').
!
Item was changed:
----- Method: Installer class>>isMetacelloInstalled (in category 'scripts') -----
isMetacelloInstalled
"Squeak is shipped with the global #Metacello referring to lightweight MetacelloStub. After the first message is sent, the latest Metacello is installed, replacing the stub."
+ ^ (Smalltalk at: #Metacello ifAbsent: [^ false]) ~= MetacelloStub!
- ^ (Smalltalk at: #Metacello) ~= MetacelloStub!
Marcel Taeumel uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-cmm.423.mcz
==================== Summary ====================
Name: KernelTests-cmm.423
Author: cmm
Time: 31 May 2022, 5:53:42.444296 pm
UUID: a504f011-37fb-4d93-ae2f-c3e1fc832b49
Ancestors: KernelTests-nice.422
#testOutOfMemorySignalExtreme can be stressful on a system that running the Squeak VM unconstrained (which is the default). Therefore, only run it if the vm is explicitly constrained.
Note this requires
=============== Diff against KernelTests-nice.422 ===============
Item was changed:
----- Method: AllocationTest>>testOutOfMemorySignalExtreme (in category 'tests') -----
testOutOfMemorySignalExtreme
+ "Try to allocate more memory than permitted by the -memory vm argument, and check whether the expected error is signaled. Note that current (2017) Spur VMs fail in #new: and #basicNew: with #'bad argument' if given other than a non-negative SmallInteger."
+ Smalltalk heapMemoryLimit ifNotNil:
+ [ : bytes |
+ self
+ should: [ Array new: (bytes // Smalltalk wordSize) + 100 ]
+ raise: OutOfMemory, Error
+ withExceptionDo:
+ [:ex|
+ ex class == Error ifTrue:
+ [self assert: [ex messageText includesSubstring: 'basicNew: with invalid argument' ]]]]!
- "Try to allocate a ridiculous amount of memory and check whether the expected error is signaled. Call Eliot when this test fails, he want your machine. :-)
-
- Note that current (2017) Spur VMs fail in #new: and #basicNew: with #'bad argument' if given other than a non-negative SmallInteger.
-
- Also note that this test can be quite stressful to your machine depending on how your operating system allocates the required memory behind the curtains. Better not triggering some robot fetching a tape from somewhere..."
-
- | sz |
- sz := 1024*1024*1024*1024. "= 1 TiB"
- self should: [Array new: sz]
- raise: OutOfMemory, Error
- withExceptionDo:
- [:ex|
- ex class == Error ifTrue:
- [self assert: [ex messageText includesSubstring: 'basicNew: with invalid argument']]]!