Skip to content

Commit

Permalink
squeak: re-add BlockContext extensions via new Squeak6Compatibility p…
Browse files Browse the repository at this point in the history
…ackage

See #552 (comment)
  • Loading branch information
LinqLover committed May 25, 2022
1 parent 1698d8d commit 8d11206
Show file tree
Hide file tree
Showing 18 changed files with 85 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ baseline: spec
package: 'Metacello-TestsMC' with: [ spec requires: #('Gofer Tests') ];
package: 'Metacello-Platform'
with: [
spec file: 'Metacello-Platform.squeak'; requires: #('Ston') ];
spec file: 'Metacello-Platform.squeak'; requires: #('Ston' 'squeak-compatibility') ];
yourself ].
spec
for:
Expand All @@ -294,6 +294,14 @@ baseline: spec
package: 'Metacello-Platform'
with: [ spec requires: #('WebClient' 'SqueakSSL-Core') ];
yourself ].
spec group: 'squeak-compatibility' with: #().
spec
for:
#(#'squeak4.x' #'squeak5.x')
do: [
spec
package: 'Metacello-Squeak6Compatibility';
group: 'squeak-compatibility' with: #('Metacello-Squeak6Compatibility') ].
spec
for: #'gemstone'
do: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
"class" : {
},
"instance" : {
"baseline:" : "tobe 5/15/2020 20:02",
"baseline:" : "ct 5/25/2022 13:05",
"filetree:" : "EstebanLorenzano 10/26/2017 11:42",
"gemstone10beta311PostLoadDoIt" : "dkh 07/24/2012 18:09",
"gemstoneMetacelloGemStonePlatform3xInit" : "tobe 7/3/2020 09:57:21",
"gofer:" : "EstebanLorenzano 10/26/2017 11:42",
"reprimeRegistryIssue197" : "dkh 09/30/2014 17:40",
"testResourcePostLoadDoIt" : "dkh 6/1/2012 09:18:17" } }
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SystemOrganization addCategory: #'BaselineOfMetacello'!
SystemOrganization addCategory: #BaselineOfMetacello!

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions repository/Metacello-Squeak6Compatibility.package/.filetree
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"noMethodMetaData" : true,
"separateMethodMetaAndSource" : false,
"useCypressPropertiesFile" : true }
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*Metacello-Squeak6Compatibility-*metacello-platform
setAuthorInMetacelloConfig: aMetacelloConfig

aMetacelloConfig setAuthorWithBlock: self
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*Metacello-Squeak6Compatibility-*metacello-platform
setBlessingInMetacelloConfig: aMetacelloConfig

aMetacelloConfig setBlessingWithBlock: self
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*Metacello-Squeak6Compatibility-*metacello-platform
setDescriptionInMetacelloConfig: aMetacelloConfig

aMetacelloConfig setDescriptionWithBlock: self
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*Metacello-Squeak6Compatibility-*metacello-platform
setPackage: aString withInMetacelloConfig: aMetacelloConfig

aMetacelloConfig setPackage: aString withBlock: self
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*Metacello-Squeak6Compatibility-*metacello-platform
setProject: aString withInMetacelloConfig: aMetacelloConfig

aMetacelloConfig setProject: aString withBlock: self
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*Metacello-Squeak6Compatibility-*metacello-platform
setTimestampInMetacelloConfig: aMetacelloConfig

aMetacelloConfig setTimestampWithBlock: self
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
*Metacello-Squeak6Compatibility-*metacello-platform
valueSupplyingMetacelloAnswers: aListOfPairs
"evaluate the block using a list of questions / answers that might be called upon to
automatically respond to Object>>confirm: or FillInTheBlank requests"

^ [self value]
on: ProvideAnswerNotification
do:
[:notify | | answer caption |

caption := notify messageText withSeparatorsCompacted. "to remove new lines"
answer := aListOfPairs
detect:
[:each | caption = each first or:
[(caption includesSubstring: each first caseSensitive: false) or:
[(each first match: caption) or:
[(String includesSelector: #matchesRegex:) and:
[ [ caption matchesRegex: each first ] on: Error do: [:ignored | false ]]]]]]
ifNone: [nil].
answer
ifNotNil: [notify resume: answer second]
ifNil:
[ | outerAnswer |
outerAnswer := ProvideAnswerNotification signal: notify messageText.
outerAnswer
ifNil: [notify resume]
ifNotNil: [notify resume: outerAnswer]]]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"class" : {
},
"instance" : {
"setAuthorInMetacelloConfig:" : "dkh 6/12/2012 10:18:46.076",
"setBlessingInMetacelloConfig:" : "dkh 6/12/2012 10:18:46.076",
"setDescriptionInMetacelloConfig:" : "dkh 6/12/2012 10:18:46.076",
"setPackage:withInMetacelloConfig:" : "dkh 6/12/2012 10:18:46.076",
"setProject:withInMetacelloConfig:" : "dkh 6/12/2012 10:18:46.076",
"setTimestampInMetacelloConfig:" : "dkh 6/12/2012 10:18:46.076",
"valueSupplyingMetacelloAnswers:" : "dkh 6/12/2012 10:18:46.076" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
"name" : "BlockContext" }
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(name 'Metacello-Squeak6Compatibility')
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(name 'Metacello-Squeak6Compatibility-ct.1' message 'Add compatibility extensions for BlockContext from Metacello-PlatformAs of Squeak 6.0, BlockContext is no longer available in the base system, so we need to provide these extensions in a separate package to avoid a #dependencyWarning during installation. See https://github.com/Metacello/metacello/pull/552.' id '14a7bad5-7faa-f746-a541-31b9e656f2c1' date '25 May 2022' time '1:09:46.088867 pm' author 'ct' ancestors () stepChildren ())
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}

0 comments on commit 8d11206

Please sign in to comment.