On Tue, Oct 17, 2017 at 06:28:05AM +0000, Alistair Grant wrote: > Hi All, > > I'm attempting to load Roassal2 in to Pharo7 and am getting: > > UndefinedObject(Object)>>doesNotUnderstand: #asTraitComposition > > > It can be reproduced in a clean Pharo7 image, e.g. > Pharo7.0-32bit-d1b0e3e.image (downloaded 16 Oct 2017), and executing: > > Gofer it > smalltalkhubUser: 'ObjectProfile' project: 'Roassal2'; > configurationOf: 'Roassal2'; > loadStable. > > > OS: Ubuntu 16.04. > > I last rebuilt my image on 3 October without any problems. > > Any suggestions? I suspect the combination of Monticello and Traits > will take me quite a while to figure out.
This could simply be an ordering issue, i.e. maybe Monticello / Metacello needs to ensure that the traits are loaded before the classes. Presumably at some point during the load there is a list of classes that are going to be loaded. If someone can point me to the correct location it will save some time tracking it down. Thanks! Alistair > Stack Trace: > > UndefinedObject(Object)>>doesNotUnderstand: #asTraitComposition > MCClassDefinition>>traitCompositionCompiled > [ :builder | > builder > superclass: superClass; > name: name; > layoutClass: (ObjectLayout layoutForType: type); > slots: self instanceVariables; > sharedVariables: self classVariables; > sharedPools: self sharedPoolsString; > classSlots: self classInstanceVariables; > traitComposition: self traitCompositionCompiled; > classTraitComposition: self classTraitCompositionCompiled; > comment: comment stamp: commentStamp; > category: category; > environment: superClass environment ] in [ PharoClassInstaller > make: [ :builder | > builder > superclass: superClass; > name: name; > layoutClass: (ObjectLayout layoutForType: type); > slots: self instanceVariables; > sharedVariables: self classVariables; > sharedPools: self sharedPoolsString; > classSlots: self classInstanceVariables; > traitComposition: self traitCompositionCompiled; > classTraitComposition: self > classTraitCompositionCompiled; > comment: comment stamp: commentStamp; > category: category; > environment: superClass environment ] ] in > MCClassDefinition>>createClass in Block: [ :builder | ... > PharoClassInstaller class(AbstractClassInstaller class)>>make: > [ PharoClassInstaller > make: [ :builder | > builder > superclass: superClass; > name: name; > layoutClass: (ObjectLayout layoutForType: type); > slots: self instanceVariables; > sharedVariables: self classVariables; > sharedPools: self sharedPoolsString; > classSlots: self classInstanceVariables; > traitComposition: self traitCompositionCompiled; > classTraitComposition: self > classTraitCompositionCompiled; > comment: comment stamp: commentStamp; > category: category; > environment: superClass environment ] ] in > MCClassDefinition>>createClass in Block: [ PharoClassInstaller... > BlockClosure>>on:do: > MCClassDefinition>>createClass > MCClassDefinition>>load > MCClassDefinition(MCDefinition)>>addMethodAdditionTo: > [ :each | each addMethodAdditionTo: methodAdditions ] in > MCPackageLoader>>basicLoadDefinitions in Block: [ :each | each > addMethodAdditionTo: methodAddition...etc... > [ :each | > | newLabel | > "Special handling for first and last element" > (count = 0 > or: [ count + 1 = size > or: [ (Time millisecondsSince: lastUpdate) >= msecs ] ]) > ifTrue: [ bar current: count. > oldLabel = (newLabel := (labelBlock cull: each) ifNil: [ > oldLabel ]) > ifFalse: [ bar label: newLabel. > oldLabel := newLabel ]. > lastUpdate := Time millisecondClockValue ]. > aBlock value: each. > count := count + 1 ] in [ :bar | > labelBlock := aStringOrBlock isString > ifTrue: [ bar label: aStringOrBlock. > [ :dummyItem | aStringOrBlock ] ] > ifFalse: [ aStringOrBlock ]. > self > do: [ :each | > | newLabel | > "Special handling for first and last element" > (count = 0 > or: [ count + 1 = size > or: [ (Time millisecondsSince: > lastUpdate) >= msecs ] ]) > ifTrue: [ bar current: count. > oldLabel > = (newLabel := (labelBlock cull: each) > ifNil: [ oldLabel ]) > ifFalse: [ bar label: newLabel. > oldLabel := newLabel ]. > lastUpdate := Time millisecondClockValue ]. > aBlock value: each. > count := count + 1 ] ] in > OrderedCollection(Collection)>>do:displayingProgress:every: in Block: [ :each > | ... > OrderedCollection>>do: > [ :bar | > labelBlock := aStringOrBlock isString > ifTrue: [ bar label: aStringOrBlock. > [ :dummyItem | aStringOrBlock ] ] > ifFalse: [ aStringOrBlock ]. > self > do: [ :each | > | newLabel | > "Special handling for first and last element" > (count = 0 > or: [ count + 1 = size > or: [ (Time millisecondsSince: > lastUpdate) >= msecs ] ]) > ifTrue: [ bar current: count. > oldLabel > = (newLabel := (labelBlock cull: each) > ifNil: [ oldLabel ]) > ifFalse: [ bar label: newLabel. > oldLabel := newLabel ]. > lastUpdate := Time millisecondClockValue ]. > aBlock value: each. > count := count + 1 ] ] in > OrderedCollection(Collection)>>do:displayingProgress:every: in Block: [ :bar > | ... > BlockClosure>>cull: > [ ^ block cull: self ] in [ self prepareForRunning. > CurrentJob value: self during: [ ^ block cull: self ] ] in Job>>run in Block: > [ ^ block cull: self ] > [ activeProcess psValueAt: index put: anObject. > aBlock value ] in CurrentJob(DynamicVariable)>>value:during: in Block: [ > activeProcess psValueAt: index put: anObject.... > BlockClosure>>ensure: > CurrentJob(DynamicVariable)>>value:during: > CurrentJob class(DynamicVariable class)>>value:during: > [ self prepareForRunning. > CurrentJob value: self during: [ ^ block cull: self ] ] in Job>>run in Block: > [ self prepareForRunning.... > BlockClosure>>ensure: > Job>>run > MorphicUIManager(UIManager)>>displayProgress:from:to:during: > ByteString(String)>>displayProgressFrom:to:during: > OrderedCollection(Collection)>>do:displayingProgress:every: > OrderedCollection(Collection)>>do:displayingProgress: > MCPackageLoader>>basicLoadDefinitions > [ self basicLoadDefinitions ] in MCPackageLoader>>basicLoad in Block: [ self > basicLoadDefinitions ] > [ aBlock value ] in SourceFileArray>>deferFlushDuring: in Block: [ aBlock > value ] > BlockClosure>>ensure: > > --