Hi,
When I tried loading the latest Pier, I got a walkback triggered by: PRMigrations>>#migrateChildren GRGemStonePlatform>>#magritteAllSubInstancesOf: aClass do: aBlock which calls the unimplemented: aClass allSubInstancesDo: aBlock I tried fixing the problem with the following implementation: --- Class>>#allSubInstancesDo: aBlock "Evaluate the argument, aBlock, for each of the current instances of the receiver and all its subclasses." self allInstancesDo: aBlock. self allSubclassesDo: [:sub | sub allInstancesDo: aBlock] Class>>#allInstancesDo: aBlock self allInstances do: [ :each | aBlock value: each ] --- The problem is that #allInstances causes an abort which signals an error while loading the code.
Note: that in Pharo both methods above are implemented on Behavor not Class - I choose Class to match Class>>#allInstances Nick
|
Yea, code that does allInstances just does not get along with GemStone
... That code has been around for awhile and I'm not quite sure if it actually needs to run on every load.... Of course the problem is showing up because I repackaged some of the basic monticello methods: As many of you know, I have spent the fair part of the last few months porting Monticello to the base 3.0 and that is what triggered these changes in packaging ... methods need to be packaged differently when you are bootstrapping with Monticello files instead of a filein ... The plan is to get to the point where monticello loads/migrations are "atomic" ... I think we can get pretty close ... I made the decision to repackage in 2.x even though the real need was in 3.0 so I can see at this point that my decision to repackage in 2.x was a completely bad idea ... so I'll undo the repackaging for 2.x altogether ... Dale On 11/14/2010 04:52 PM, Nick Ager wrote: > Hi, > > When I tried loading the latest Pier, I got a walkback triggered by: > > PRMigrations>>#migrateChildren > > GRGemStonePlatform>>#magritteAllSubInstancesOf: aClass do: aBlock > > > which calls the unimplemented: > > aClass allSubInstancesDo: aBlock > > > I tried fixing the problem with the following implementation: > > --- > > Class>>#allSubInstancesDo: aBlock > > "Evaluate the argument, aBlock, for each of the current instances of the > > receiver and all its subclasses." > > self allInstancesDo: aBlock. > > self allSubclassesDo: [:sub | sub allInstancesDo: aBlock] > > > Class>>#allInstancesDo: aBlock > > self allInstances do: [ :each | aBlock value: each ] > > > --- > > The problem is that #allInstances causes an abort which signals an error > while loading the code. > > Note: that in Pharo both methods above are implemented on Behavor not > Class - I choose Class to match Class>>#allInstances > > Nick |
In reply to this post by Nick
Nick,
I've reverted the move of methods from Squeak to Monticello package and the load is working for me... I'm still working on the Grease/Seaside30 configuration issues ... I expect to have something tomorrow ... Dale On 11/14/2010 04:52 PM, Nick Ager wrote: > Hi, > > When I tried loading the latest Pier, I got a walkback triggered by: > > PRMigrations>>#migrateChildren > > GRGemStonePlatform>>#magritteAllSubInstancesOf: aClass do: aBlock > > > which calls the unimplemented: > > aClass allSubInstancesDo: aBlock > > > I tried fixing the problem with the following implementation: > > --- > > Class>>#allSubInstancesDo: aBlock > > "Evaluate the argument, aBlock, for each of the current instances of the > > receiver and all its subclasses." > > self allInstancesDo: aBlock. > > self allSubclassesDo: [:sub | sub allInstancesDo: aBlock] > > > Class>>#allInstancesDo: aBlock > > self allInstances do: [ :each | aBlock value: each ] > > > --- > > The problem is that #allInstances causes an abort which signals an error > while loading the code. > > Note: that in Pharo both methods above are implemented on Behavor not > Class - I choose Class to match Class>>#allInstances > > Nick |
Free forum by Nabble | Edit this page |