Skip to content

Commit

Permalink
Issue GsDevKit#83: more tests a more robust fix and the beginnings of…
Browse files Browse the repository at this point in the history
… a more robust test (double whammy) that should stress the proposed fix
  • Loading branch information
dalehenrich committed Jan 3, 2016
1 parent fcc8e24 commit 23f845d
Show file tree
Hide file tree
Showing 19 changed files with 237 additions and 75 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ _defineClassNamed: aClassName with: aBlock
failedMethodCompilations := cls
copyMCMethodsFrom: originalClass
dictionaries: GsSession currentSession symbolList.
MCPlatformSupport
redefineSubclassesOf: originalClass
using: classOrganizer. "force redefinition of existing subclasses"
MCPlatformSupport migrateInstancesWithSubclassesOf: cls.
failedMethodCompilations notEmpty
ifTrue: [
| errorStream |
Expand All @@ -29,21 +33,15 @@ _defineClassNamed: aClassName with: aBlock
cr.
failedMethodCompilations
do: [ :ar |
| details mth |
details := ar at: 3.
mth := ar at: 2.
| details def |
details := ar at: 1.
def := ar at: 2.
errorStream
tab;
nextPutAll:
mth inClass name asString , '>>' , mth selector asString , ': ';
nextPutAll: def description , ': ';
cr;
nextPutAll: details;
cr ].
self error: errorStream contents ].
MCPlatformSupport
redefineSubclassesOf: originalClass
using: classOrganizer. "force redefinition of existing subclasses"
MCPlatformSupport migrateInstancesWithSubclassesOf: cls ].
cr ] "self error: errorStream contents" ] ].
cls category = originalClass category
ifTrue: [
SystemChangeNotifier uniqueInstance
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"class" : {
"_defineClassNamed:with:" : "dkh 01/02/2016 16:52" },
"_defineClassNamed:with:" : "dkh 01/02/2016 17:27" },
"instance" : {
"_ogDefinitionInContext:" : "dkh 01/05/2010 11:51",
"category:" : "dkh 09/27/2011 10:49",
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(name 'Change-Notification.v310-dkh.24' message 'Issue #83: add another test case and include the initial gut at bugifx (missing in earlier commit)' id 'f16036db-beee-4b1f-bae7-41587e2458dc' date '01/02/2016' time '16:57:58' author 'dkh' ancestors ((name 'Change-Notification.v310-dkh.23' message 'Issue #74: add call to MCMethodDefinition class>>resetCachedDefinitions when removing a class from the system or from class history' id 'd612e6f5-56f2-43d4-87fd-f6ddaf598b41' date '09/12/2015' time '14:28:38' author 'dkh' ancestors ((name 'Change-Notification.v310-dkh.22' message 'Issue #74: add Class>>removeFromClassHistory so that cache cleanup can be centralized ... ' id '9924751a-8402-4d90-82e0-cfdade9ef584' date '09/12/2015' time '12:30:26' author 'dkh' ancestors ((name 'Change-Notification.v310-dkh.21' message 'eliminate use of some of the methods deprecated in 3.x ... fix bugs in Behavior>>methodsReferingToLiteral:, Behavior>>_basicRemoveSelector:environmentId:, and Behavior>>moveMethod:toCategory:. replace refs to obolete class ExecutableBlock with ExecBlock' id '860e808f-3c2c-4892-90fe-7c71471f67a4' date '12/24/2013' time '18:03:33' author 'dkh' ancestors ((name 'Change-Notification.v310-dkh.20' message 'rename Change-Notification.v3-dkh.20 to Change-Notification.v310-dkh.20 for move to FileTree repo' id '1e0e7838-f4ba-40df-b498-73359a1a7de8' date '07/17/2013' time '16:44:57' author 'dkh' ancestors ((name 'Change-Notification.v3-dkh.20' message '0.243.1 (dkh.157)- for bug 42589, need to support old-style description comments' id '4b9353ed-4256-4810-bdf3-ac1395d043b0' date '11/15/2012' time '12:36:26' author 'dkh' ancestors ((name 'Change-Notification.v3-dkh.19' message '0.243.1 (dkh.156)- fix bug42589: Stack overflow in seaside upgrade' id '59a74a92-d623-4f99-923b-34d441aef746' date '11/15/2012' time '11:33:36' author 'dkh' ancestors ((name 'Change-Notification.v3-dkh.18' message '0.243 (dkh.145):- port fix for Issue 309 to 3.x' id '47816525-9c6e-4132-bfb4-0e2e48a85369' date '04/17/2012' time '09:48:00' author 'dkh' ancestors ((name 'Change-Notification.v3-dkh.17' message '0.241 (dkh.135):- fix rename category bug' id 'd9cd8b9c-45a7-404b-bec4-b0d4ba058618' date '10/19/2011' time '21:50:11' author 'dkh' ancestors ((name 'Change-Notification.v3-dkh.16' message '- merge Change-Notification.v3-dkh.15, Change-Notification-dkh.6' id '52b88184-423a-45a0-824d-e98fc14d7ec2' date '10/06/2011' time '14:48:48' author 'dkh' ancestors ((name 'Change-Notification.v3-dkh.15' message '0.241 (dkh.123) [3.0]:- replace use of ' id '64a83117-5f6e-47da-8372-ba47e94a8cb3' date '07/25/2011' time '17:50:28' author 'dkh' ancestors ((name 'Change-Notification.v3-DaleHenrichs.14' message '- merge Change-Notification-DaleHenrichs.5' id '84cdc95f-607a-4b2b-a2a8-365ce38fdffc' date '03/11/2011' time '12:37:56' author 'DaleHenrichs' ancestors ((name 'Change-Notification.v3-DaleHenrichs.13' message '- integrate Allen''s bugfix for Bug 41228: CompilerWarning would be useful' id '4991fb4b-7ce2-4063-aa20-2f332eb471c5' date '03/07/2011' time '17:08:26' author 'DaleHenrichs' ancestors ((name 'Change-Notification.v3-DaleHenrichs.12' message '- mods to be compatible with the new Exception hierarchy for 3.0' id 'efd6a1f0-e099-42f3-827f-cd625f57ce4d' date '12/14/2010' time '15:12:47' author 'DaleHenrichs' ancestors ((name 'Change-Notification.v3-DaleHenrichs.11' message '- pick up most recent changes from 2.x' id 'ee8fc354-efee-4a8e-9d7c-0e1afa6361c2' date '10/27/2010' time '13:24:05' author 'DaleHenrichs' ancestors ((name 'Change-Notification.v3-DaleHenrichs.10' message '- monticello refs belong in Monticello package' id '32daeb4e-f4c8-4296-b21c-d4b5345bd83f' date '10/26/2010' time '16:57:42' author 'DaleHenrichs' ancestors ((name 'Change-Notification.v3-DaleHenrichs.9' message '- move MCPlatformSupport to Change-Notification (for now)' id 'a6c1028b-611e-4666-9dbd-2365b26f2031' date '10/26/2010' time '14:41:56' author 'DaleHenrichs' ancestors ((name 'Change-Notification.v3-ao.8' message '- Allen''s patches' id 'c718d82b-ac1f-41e0-b107-2b2032c0ff1a' date '10/13/1910' time '11:52:22' author 'ao' ancestors ((name 'Change-Notification.v3-ao.7' message 'fix chunk format' id '48f0b54b-7aec-4514-86e1-c2fd5a7bd0c7' date '07/13/1910' time '15:17:42' author 'ao' ancestors ((name 'Change-Notification.v3-ao.6' message 'fix ArrayBuilder; fix bugs in move method to different category; new class creation options' id '0a31c78e-e6c2-4570-a402-047b21f2c234' date '07/13/1910' time '14:12:08' author 'ao' ancestors ((name 'Change-Notification.v3-DaleHenrichs.4' message '- merge to bring 3.0 versions up to GLASS 1.0-beta.7' id '9a793177-ba99-4226-98d5-3329eb113a0d' date '01/29/1910' time '14:29:27' author 'DaleHenrichs' ancestors ((name 'Change-Notification.v3-ao.3' message 'changes for new lookupCache coherency' id 'dca0d3fb-9cd9-46c4-89ee-292d8abbdd13' date '07/27/2009' time '10:01:44' author 'ao' ancestors ((name 'Change-Notification.v3-dkh.2' message '- GemStone 3.0 branch- porting GLASS 0.232' id '1da41731-5550-412b-99b0-220686f32150' date '07/13/2009' time '13:39:46' author 'dkh' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())(name 'Change-Notification-dkh.7' message '0.242 (dkh.139):- fix Issue 309: ConfigurationofMetacello dirtied during GLASS 1.0-beta.8.7.1 load http://code.google.com/p/glassdb/issues/detail?id=309' id 'aeb899f7-d8aa-4c6d-8645-572ba114bbe6' date '11/16/2011' time '16:16:15' author 'dkh' ancestors ((name 'Change-Notification-dkh.6' message '0.241 (dkh.130):- fix Issue 285: Changing class category does not reset class cache http://code.google.com/p/glassdb/issues/detail?id=285' id '3c780f44-6f4b-4f6e-bad6-d16e50f24e89' date '09/27/2011' time '11:01:21' author 'dkh' ancestors ((name 'Change-Notification-DaleHenrichs.5' message '- MetacelloBrowser event support' id '11513326-3fca-4c7e-8ea7-880cf144c02b' date '03/11/2011' time '12:17:39' author 'DaleHenrichs' ancestors ((name 'Change-Notification-DaleHenrichs.4' message '- fix Issue 164: http://code.google.com/p/glassdb/issues/detail?id=164 "need to test for base overrides"' id 'efa16a31-77ee-41a2-8c96-8b97febe0d46' date '08/19/1910' time '14:42:22' author 'DaleHenrichs' ancestors ((name 'Change-Notification-dkh.3' message '- Move some critical methods for Minimal group from OB-Standard package to Change-Notification package: Class>>definition Class>>_ogDefinitionInContext: Class>>_ogDefinitionInContext:className:superClassName:' id 'b4295897-e76b-424e-99d1-c5e59f8e3ca9' date '01/05/1910' time '12:06:01' author 'dkh' ancestors ((name 'Change-Notification-dkh.2' message '- fix sent but not implemented' id '99bf4ef9-9fb1-4832-b428-261ad8b5e7ea' date '08/11/2009' time '10:22:58' author 'dkh' ancestors ((name 'Change-Notification-dkh.1' message '- moved methods into Change-Notification in order to make it easier to load ... also in preparation for making notification optional ' id '05353783-72a1-4937-a710-79c00c489680' date '07/02/2009' time '06:58:38' author 'dkh' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())
(name 'Change-Notification.v310-dkh.25' message 'Issue #83: more tests a more robust fix and the beginnings of a more robust test (double whammy) that should stress the proposed fix' id 'e7cbfc4f-a8bd-4b62-a2d1-dd77665b223a' date '01/02/2016' time '18:43:15' author 'dkh' ancestors ((name 'Change-Notification.v310-dkh.24' message 'Issue #83: add another test case and include the initial gut at bugifx (missing in earlier commit)' id 'f16036db-beee-4b1f-bae7-41587e2458dc' date '01/02/2016' time '16:57:58' author 'dkh' ancestors ((name 'Change-Notification.v310-dkh.23' message 'Issue #74: add call to MCMethodDefinition class>>resetCachedDefinitions when removing a class from the system or from class history' id 'd612e6f5-56f2-43d4-87fd-f6ddaf598b41' date '09/12/2015' time '14:28:38' author 'dkh' ancestors ((name 'Change-Notification.v310-dkh.22' message 'Issue #74: add Class>>removeFromClassHistory so that cache cleanup can be centralized ... ' id '9924751a-8402-4d90-82e0-cfdade9ef584' date '09/12/2015' time '12:30:26' author 'dkh' ancestors ((name 'Change-Notification.v310-dkh.21' message 'eliminate use of some of the methods deprecated in 3.x ... fix bugs in Behavior>>methodsReferingToLiteral:, Behavior>>_basicRemoveSelector:environmentId:, and Behavior>>moveMethod:toCategory:. replace refs to obolete class ExecutableBlock with ExecBlock' id '860e808f-3c2c-4892-90fe-7c71471f67a4' date '12/24/2013' time '18:03:33' author 'dkh' ancestors ((name 'Change-Notification.v310-dkh.20' message 'rename Change-Notification.v3-dkh.20 to Change-Notification.v310-dkh.20 for move to FileTree repo' id '1e0e7838-f4ba-40df-b498-73359a1a7de8' date '07/17/2013' time '16:44:57' author 'dkh' ancestors ((name 'Change-Notification.v3-dkh.20' message '0.243.1 (dkh.157)- for bug 42589, need to support old-style description comments' id '4b9353ed-4256-4810-bdf3-ac1395d043b0' date '11/15/2012' time '12:36:26' author 'dkh' ancestors ((name 'Change-Notification.v3-dkh.19' message '0.243.1 (dkh.156)- fix bug42589: Stack overflow in seaside upgrade' id '59a74a92-d623-4f99-923b-34d441aef746' date '11/15/2012' time '11:33:36' author 'dkh' ancestors ((name 'Change-Notification.v3-dkh.18' message '0.243 (dkh.145):- port fix for Issue 309 to 3.x' id '47816525-9c6e-4132-bfb4-0e2e48a85369' date '04/17/2012' time '09:48:00' author 'dkh' ancestors ((name 'Change-Notification.v3-dkh.17' message '0.241 (dkh.135):- fix rename category bug' id 'd9cd8b9c-45a7-404b-bec4-b0d4ba058618' date '10/19/2011' time '21:50:11' author 'dkh' ancestors ((name 'Change-Notification.v3-dkh.16' message '- merge Change-Notification.v3-dkh.15, Change-Notification-dkh.6' id '52b88184-423a-45a0-824d-e98fc14d7ec2' date '10/06/2011' time '14:48:48' author 'dkh' ancestors ((name 'Change-Notification.v3-dkh.15' message '0.241 (dkh.123) [3.0]:- replace use of ' id '64a83117-5f6e-47da-8372-ba47e94a8cb3' date '07/25/2011' time '17:50:28' author 'dkh' ancestors ((name 'Change-Notification.v3-DaleHenrichs.14' message '- merge Change-Notification-DaleHenrichs.5' id '84cdc95f-607a-4b2b-a2a8-365ce38fdffc' date '03/11/2011' time '12:37:56' author 'DaleHenrichs' ancestors ((name 'Change-Notification.v3-DaleHenrichs.13' message '- integrate Allen''s bugfix for Bug 41228: CompilerWarning would be useful' id '4991fb4b-7ce2-4063-aa20-2f332eb471c5' date '03/07/2011' time '17:08:26' author 'DaleHenrichs' ancestors ((name 'Change-Notification.v3-DaleHenrichs.12' message '- mods to be compatible with the new Exception hierarchy for 3.0' id 'efd6a1f0-e099-42f3-827f-cd625f57ce4d' date '12/14/2010' time '15:12:47' author 'DaleHenrichs' ancestors ((name 'Change-Notification.v3-DaleHenrichs.11' message '- pick up most recent changes from 2.x' id 'ee8fc354-efee-4a8e-9d7c-0e1afa6361c2' date '10/27/2010' time '13:24:05' author 'DaleHenrichs' ancestors ((name 'Change-Notification.v3-DaleHenrichs.10' message '- monticello refs belong in Monticello package' id '32daeb4e-f4c8-4296-b21c-d4b5345bd83f' date '10/26/2010' time '16:57:42' author 'DaleHenrichs' ancestors ((name 'Change-Notification.v3-DaleHenrichs.9' message '- move MCPlatformSupport to Change-Notification (for now)' id 'a6c1028b-611e-4666-9dbd-2365b26f2031' date '10/26/2010' time '14:41:56' author 'DaleHenrichs' ancestors ((name 'Change-Notification.v3-ao.8' message '- Allen''s patches' id 'c718d82b-ac1f-41e0-b107-2b2032c0ff1a' date '10/13/1910' time '11:52:22' author 'ao' ancestors ((name 'Change-Notification.v3-ao.7' message 'fix chunk format' id '48f0b54b-7aec-4514-86e1-c2fd5a7bd0c7' date '07/13/1910' time '15:17:42' author 'ao' ancestors ((name 'Change-Notification.v3-ao.6' message 'fix ArrayBuilder; fix bugs in move method to different category; new class creation options' id '0a31c78e-e6c2-4570-a402-047b21f2c234' date '07/13/1910' time '14:12:08' author 'ao' ancestors ((name 'Change-Notification.v3-DaleHenrichs.4' message '- merge to bring 3.0 versions up to GLASS 1.0-beta.7' id '9a793177-ba99-4226-98d5-3329eb113a0d' date '01/29/1910' time '14:29:27' author 'DaleHenrichs' ancestors ((name 'Change-Notification.v3-ao.3' message 'changes for new lookupCache coherency' id 'dca0d3fb-9cd9-46c4-89ee-292d8abbdd13' date '07/27/2009' time '10:01:44' author 'ao' ancestors ((name 'Change-Notification.v3-dkh.2' message '- GemStone 3.0 branch- porting GLASS 0.232' id '1da41731-5550-412b-99b0-220686f32150' date '07/13/2009' time '13:39:46' author 'dkh' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())(name 'Change-Notification-dkh.7' message '0.242 (dkh.139):- fix Issue 309: ConfigurationofMetacello dirtied during GLASS 1.0-beta.8.7.1 load http://code.google.com/p/glassdb/issues/detail?id=309' id 'aeb899f7-d8aa-4c6d-8645-572ba114bbe6' date '11/16/2011' time '16:16:15' author 'dkh' ancestors ((name 'Change-Notification-dkh.6' message '0.241 (dkh.130):- fix Issue 285: Changing class category does not reset class cache http://code.google.com/p/glassdb/issues/detail?id=285' id '3c780f44-6f4b-4f6e-bad6-d16e50f24e89' date '09/27/2011' time '11:01:21' author 'dkh' ancestors ((name 'Change-Notification-DaleHenrichs.5' message '- MetacelloBrowser event support' id '11513326-3fca-4c7e-8ea7-880cf144c02b' date '03/11/2011' time '12:17:39' author 'DaleHenrichs' ancestors ((name 'Change-Notification-DaleHenrichs.4' message '- fix Issue 164: http://code.google.com/p/glassdb/issues/detail?id=164 "need to test for base overrides"' id 'efa16a31-77ee-41a2-8c96-8b97febe0d46' date '08/19/1910' time '14:42:22' author 'DaleHenrichs' ancestors ((name 'Change-Notification-dkh.3' message '- Move some critical methods for Minimal group from OB-Standard package to Change-Notification package: Class>>definition Class>>_ogDefinitionInContext: Class>>_ogDefinitionInContext:className:superClassName:' id 'b4295897-e76b-424e-99d1-c5e59f8e3ca9' date '01/05/1910' time '12:06:01' author 'dkh' ancestors ((name 'Change-Notification-dkh.2' message '- fix sent but not implemented' id '99bf4ef9-9fb1-4832-b428-261ad8b5e7ea' date '08/11/2009' time '10:22:58' author 'dkh' ancestors ((name 'Change-Notification-dkh.1' message '- moved methods into Change-Notification in order to make it easier to load ... also in preparation for making notification optional ' id '05353783-72a1-4937-a710-79c00c489680' date '07/02/2009' time '06:58:38' author 'dkh' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ setUp
ancestor := self setUpGsDevKitIssue77Bar3: {ancestor}.
ancestor := self setUpGsDevKitIssue83Foo1.
ancestor := self setUpGsDevKitIssue83Foo2: {ancestor}.
ancestor := self setUpGsDevKitIssue83Bar1
ancestor := self setUpGsDevKitIssue83Bar1.
ancestor := self setUpGsDevKitIssue83Baz1.
ancestor := self setUpGsDevKitIssue83Baz2: {ancestor}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
GsDevKit Issue 83
setUpGsDevKitIssue83Baz1
"self reset"

^ self
setUpPackageClassDefs:
{#'Object'.
#'GsDevKitIssue83A'.
#().
#().
#().
#'GsDevKitIssue83A'.
#'GsDevKitIssue83B'.
#().
#().
#().
#'GsDevKitIssue83B'.
#'GsDevKitIssue83C'.
#().
#().
#().
#'GsDevKitIssue83B'.
#'GsDevKitIssue83D'.
#().
#().
#()}
methodDefs:
{'GsDevKitIssue83B'.
'xxx'.
'xxx | ivar | ivar := 1. ^ivar'}
named: 'GsDevKit83Baz-dkh.1'
ancestors: #()
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
GsDevKit Issue 83
setUpGsDevKitIssue83Baz2: ancestors
"self reset"

^ self
setUpPackageClassDefs:
{#'Object'.
#'GsDevKitIssue83A'.
#(#'ivar').
#().
#().
#'GsDevKitIssue83A'.
#'GsDevKitIssue83B'.
#().
#().
#().
#'GsDevKitIssue83B'.
#'GsDevKitIssue83C'.
#().
#().
#().
#'GsDevKitIssue83B'.
#'GsDevKitIssue83D'.
#().
#().
#()}
methodDefs:
{'GsDevKitIssue83B'.
'xxx'.
'xxx | bvar | bvar := 1. ^bvar'}
named: 'GsDevKit83Baz-dkh.2'
ancestors: ancestors
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
},
"instance" : {
"monticelloRepository" : "DaleHenrichs 01/25/2011 13:39",
"setUp" : "dkh 01/02/2016 16:21",
"setUp" : "dkh 01/02/2016 17:41",
"setUpGsDeployerBar1" : "DaleHenrichs 02/18/2011 12:22",
"setUpGsDeployerBar2:" : "DaleHenrichs 02/18/2011 12:23",
"setUpGsDeployerBar3:" : "DaleHenrichs 02/18/2011 12:23",
Expand All @@ -13,6 +13,8 @@
"setUpGsDevKitIssue77Bar2:" : "dkh 09/14/2015 21:04",
"setUpGsDevKitIssue77Bar3:" : "dkh 09/14/2015 21:04",
"setUpGsDevKitIssue83Bar1" : "dkh 01/02/2016 16:43",
"setUpGsDevKitIssue83Baz1" : "dkh 01/02/2016 17:46",
"setUpGsDevKitIssue83Baz2:" : "dkh 01/02/2016 17:46",
"setUpGsDevKitIssue83Foo1" : "dkh 01/02/2016 16:30",
"setUpGsDevKitIssue83Foo2:" : "dkh 01/02/2016 16:20",
"setUpMonticelloRepository" : "DaleHenrichs 01/25/2011 13:39",
Expand Down

0 comments on commit 23f845d

Please sign in to comment.