Another data point is Lukas' build scripts for the Jenkins[1]. They use Gofer to load, but they "get the initialization correct", as does Metacello.
Dale [1] https://github.com/renggli/builder/blob/master/scripts/seaside3.st ----- Original Message ----- | From: "Dale Henrichs" <[email protected]> | To: [email protected] | Sent: Saturday, May 19, 2012 12:01:38 PM | Subject: Re: [Pharo-project] Order of sending class side #initialize | | Mariano, | | To shed some light on the exact problem, I think that you should | record the initialization order of a Metacello load and compare that | to the initialization order that you are using. | | While your algorithm looks like it is correct it doesn't necessarily | match the actual initialization order you get when using Monticello | and Metacello... | | It would be interesting to find out where the differences in order | are and then focus on understanding why... | | Dale | | ----- Original Message ----- | | From: "Mariano Martinez Peck" <[email protected]> | | To: "Pharo Development" <[email protected]> | | Sent: Saturday, May 19, 2012 11:25:57 AM | | Subject: [Pharo-project] Order of sending class side #initialize | | | | Hi guys. I am doing some experiments with FuelPackageLoader and I | | have a problem with the initialization. All my unit tests pass but | | when trying to export/import seaside/pier/magritte, I have a | | problem. | | What I do basically, is to ask Metacello the list of packages that | | I | | need to loaded for seaside and friends. The list is IN ORDER OF | | LOADING. So what I do during the import is to load each package in | | the correct order (the one Metacello told me). For each package I | | load, I initialize its classes (at the end of the load of the | | package). The order I initialize classes for a package is: | | | | ((aPackage classes select: [:each | each isBehavior]) | | sort: [:a :b | a allSuperclasses size < b allSuperclasses size ]) | | do: [:aClass | | | Transcript show: 'Initializing class: ', aClass name; cr. | | aClass initializeOnLoad] | | | | and | | | | Class >> initializeOnLoad | | (self class includesSelector: #initialize) | | ifTrue: [self initialize] | | | | | | so...I am having a problem with seaside with a class and it looks | | like a problem of the order of the initialize. Do you think | | something is wrong with our approach? any idea? | | | | thanks in advance, | | | | -- | | Mariano | | http://marianopeck.wordpress.com | | | | | |
