Marcel Taeumel uploaded a new version of FFI-Kernel to project FFI:
http://source.squeak.org/FFI/FFI-Kernel-mt.164.mcz
==================== Summary ====================
Name: FFI-Kernel-mt.164
Author: mt
Time: 21 May 2021, 11:22:51.005285 am
UUID: ce4d8f9a-e8bb-564e-9714-b5d5426178b6
Ancestors: FFI-Kernel-mt.163
I forgot the addition of #from: to the other FFI-arrays (#isFFIArray).
=============== Diff against FFI-Kernel-mt.163 ===============
Item was added:
+ ----- Method: ByteString>>from: (in category '*FFI-Kernel') -----
+ from: firstIndex
+ "See ExternalData"
+
+ ^ self copyFrom: firstIndex to: self size!
Item was added:
+ ----- Method: RawBitsArray>>from: (in category '*FFI-Kernel') -----
+ from: firstIndex
+ "See ExternalData"
+
+ ^ self copyFrom: firstIndex to: self size!
Marcel Taeumel uploaded a new version of FFI-Tools to project FFI:
http://source.squeak.org/FFI/FFI-Tools-mt.35.mcz
==================== Summary ====================
Name: FFI-Tools-mt.35
Author: mt
Time: 21 May 2021, 11:09:41.766138 am
UUID: 9978c435-751b-4c43-ad0e-8419760825ae
Ancestors: FFI-Tools-mt.34
Fixes visual glitch now that "contentType" is cached as instVar in ExternalData.
=============== Diff against FFI-Tools-mt.34 ===============
Item was changed:
----- Method: ExternalData>>explorerContentsMetaFields (in category '*FFI-Tools') -----
explorerContentsMetaFields
"Skip _type because our external type is already in the basic explorer fields because it is an instance variable. Add _contentType for clarification."
^ {
ObjectExplorerWrapper with: self containerType name: '_containerType' model: self.
- ObjectExplorerWrapper with: self contentType name: '_contentType' model: self.
}!
Marcel Taeumel uploaded a new version of FFI-Tools to project FFI:
http://source.squeak.org/FFI/FFI-Tools-mt.34.mcz
==================== Summary ====================
Name: FFI-Tools-mt.34
Author: mt
Time: 20 May 2021, 7:35:45.65158 pm
UUID: b4e13008-ef6e-5240-8777-6322a3d3edc8
Ancestors: FFI-Tools-mt.33
Complements FFI-Kernel-mt.162
=============== Diff against FFI-Tools-mt.33 ===============
Item was changed:
----- Method: ExternalData>>explorerContents (in category '*FFI-Tools') -----
explorerContents
"Prefix all instance variables and append extra meta information (e.g., the external type) as well as all structure fields as defined in #fields."
| basicExplorerFields |
basicExplorerFields := super explorerContents.
basicExplorerFields do: [:explorerField |
explorerField itemName = '_type' ifTrue: [
+ explorerField object: self externalType]].
- explorerField itemName: '_containerType']].
^ basicExplorerFields!
Item was changed:
----- Method: ExternalData>>explorerContentsMetaFields (in category '*FFI-Tools') -----
explorerContentsMetaFields
"Skip _type because our external type is already in the basic explorer fields because it is an instance variable. Add _contentType for clarification."
^ {
+ ObjectExplorerWrapper with: self containerType name: '_containerType' model: self.
ObjectExplorerWrapper with: self contentType name: '_contentType' model: self.
}!
Marcel Taeumel uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-ct.747.mcz
==================== Summary ====================
Name: Monticello-ct.747
Author: ct
Time: 7 May 2021, 11:45:19.014241 pm
UUID: 2cb0b275-8fb5-b149-b46d-41387d4d8f1f
Ancestors: Monticello-ct.746
Fixes a bug in MCHttpRespository(MCFileBasedRepository) >> #versionNamed: that occurred when the repository did not contain the requested version. As the comment in the superclass states, answer nil in this case instead of raising a NetworkError.
To do this, raise a more precise NotFound error in MCHttpRepository >> #webClientDo: if the version does not exist. I checked all other senders and handlers of the NetworkError; no one else depends on the old behavior.
=============== Diff against Monticello-ct.746 ===============
Item was changed:
----- Method: MCFileBasedRepository>>versionNamed: (in category 'versions') -----
versionNamed: aMCVersionName
"For FileBased repositories, aMCVersionName must have the appropriate extension!! :-("
| version |
version := self cache
at: aMCVersionName
ifAbsent:
[ [ self loadVersionFromFileNamed: aMCVersionName ]
+ on: FileDoesNotExistException , NotFound
- on: FileDoesNotExistException
do: [ : err | nil ] ].
self resizeCache: cache.
(version notNil and: [ version isCacheable ]) ifTrue:
[ cache
at: aMCVersionName asMCVersionName
put: version ].
^ version!
Item was changed:
----- Method: MCHttpRepository>>webClientDo: (in category 'private') -----
webClientDo: aBlock
| client attemptsLeft response result |
self class useSharedWebClientInstance ifTrue: [
"Acquire webClient by atomically storing it in the client variable and setting its value to nil."
client := webClient.
webClient := nil ].
client
ifNil: [ client := WebClient new ]
ifNotNil: [
"Attempt to avoid an error by recreating the underlying stream."
client isConnected ifFalse: [ client close ] ].
attemptsLeft := 3.
response := nil.
[ response isNil and: [ attemptsLeft > 0 ] ] whileTrue: [
response := [ aBlock value: client ]
on: NetworkError
do: [ :error |
attemptsLeft = 0 ifTrue: [ error pass ].
(3 - attemptsLeft) seconds asDelay wait.
attemptsLeft := attemptsLeft - 1.
nil "The response" ] ].
result := (response code between: 200 and: 299)
ifFalse: [
response content. "Make sure content is read."
nil ]
ifTrue: [
(RWBinaryOrTextStream with: (
response contentWithProgress: [ :total :amount |
HTTPProgress new
total: total;
amount: amount;
signal ])) reset ].
self class useSharedWebClientInstance
ifTrue: [
"Save the WebClient instance for reuse, but only if there is no client cached."
webClient
ifNil: [ webClient := client ]
ifNotNil: [ client close ] ]
ifFalse: [ client close ].
+ (response code = 404 "Not Found" or: [response code = 410 "Gone"]) ifTrue: [
+ "Need to distinguish between lookup errors and connection errors. Lookup errors will be handled by some senders following the EAFP principle. See #versionNamed:."
+ (NotFound object: response url) signal ].
result ifNil: [ NetworkError signal: 'Could not access ', location ].
^result!