baseline: spec
<baseline>
spec for: #common do: [
spec
package: 'Metacello-GitBasedRepository';
package: 'Metacello-GitHub';
package: 'FuelPlatform-Core';
package: 'FuelPlatform-Pharo-Core';
package: 'FuelPlatform-Pharo-06';
package: 'Fuel'.
].
Run the following script:
Metacello new
baseline: 'MetacelloGitBasedRepository';
repository: 'filetree://../bootstrap';
load.
���Replace missing traits"
Behavior compiledMethodAt: #fuelIgnoredInstanceVariableNames
ifPresent: [ :m | logger cr; nextPutAll: 'Trait method is present' ]
ifAbsent: [
logger cr; nextPutAll: 'Recompile missing traits ...'.
Behavior
compile: 'fuelIgnoredInstanceVariableNames
"Indicates which variables have to be ignored during serialization."
^#()';
compile: 'fuelNew
"Answer an instance of mine in which serialized references will be injected."
^ self basicNew';
compile: 'fuelNew: sizeRequested
"Answer an instance of mine in which serialized references will be injected."
^ self basicNew: sizeRequested'.
"Ignore this one"
"Class
compile: 'fuelAccept: aGeneralMapper
^self explicitRequirement.'."
ClassDescription
compile: 'instanceVariableNamesDo: anUnaryBlock
"This is part of the interface between the compiler and a class''s instance or field names.
The class should enumerate anUnaryBlock with the instance variable name strings. The order is important. Names evaluated later will override the
same names occurring earlier."
| superInstSize |
(superInstSize := self superclass notNil ifTrue: [self superclass instSize] ifFalse: [0]) > 0 ifTrue:
[self superclass instanceVariableNamesDo: anUnaryBlock].
1 to: self instSize - superInstSize do:
[:i| anUnaryBlock value: (self instVarNames at: i)]'.
].
���Add a tacky Pharo7Platform"
Smalltalk at: #FLPharo7Platform ifAbsent: [
logger cr; nextPutAll: '>Creating FLPharo7Platform'.
(Smalltalk at: #FLPharo6Platform) subclass: #FLPharo7Platform.
(Smalltalk at: #FLPharo6Platform) class compile: 'isResponsibleForCurrentPlatform
^true'.
].
logger cr; nextPutAll: 'Evaluating post load initialization...'.
(Smalltalk at: #FLPlatform) current addHacks.
On 4 Aug 2017, at 12:48, Mariano Martinez Peck <marianopeck@gmail.com> wrote:On Fri, Aug 4, 2017 at 8:42 AM, Tim Mackinnon <tim@testit.works> wrote:Sadly - false call, that was my logging message - so I���m stumped why these traits aren���t being compiled when I load in Fuel?However I have figured out why I get the BigEndian error - this is because the platform is now 7 and so the FlPharo06Platform is not being identified and the more generic FlPharoPlatform is then the default and it doesn���t implement #isBigEndian.Max, should we do something to the Fuel Platform for Pharo 7?TimOn 4 Aug 2017, at 12:20, Tim Mackinnon <tim@testit.works> wrote:I���ve spotted something interesting in my logs - when I added one of the missing methods to ClassDescription - I see in the log the message:Loaded -> Fuel-cypress.1 --- filetree:///builds/macta/PharoLambda/bootstrap --- cache
...finished baseline
Compiling missing traits...
Evaluating post load initialization...
Finished Script.However when I remove all the compiles I don���t see this message:Loaded -> Fuel-cypress.1 --- filetree:///builds/macta/PharoLambda/bootstrap --- cache
...finished baseline
Evaluating post load initialization...
Finished Script.So I wonder if this is similar to the problem I had in the previous 6.0 image - where some things didn���t seem to compile properly (in that case, it was loading a missing class that didn���t seem to cause recompilation).TimOn 4 Aug 2017, at 11:10, Tim Mackinnon <tim@testit.works> wrote:Actually there is something weird going on - as now I���m getting a complaint about "FLPharoPlatform had the subclass responsibility to implement #isBigEndian���, and that���s in the FuelPlatform-Pharo-06 which you said to include (and it looks like I am).I need to double check this - as I must be making some trivial mistake.TimOn 4 Aug 2017, at 11:01, Tim Mackinnon <tim@testit.works> wrote:Hi Mariano - I���ve looked at this again, and it was my fault - I was compiling in :fuelAccept: aGeneralMapper^self explicitRequirement.Because when I looked at the Traits for fuel - this is what it had for TClass? - as I���m not so clear on traits, what does this mean - as I had just assumed that I should flatten the Fuel methods for TCLass, TBehaviour and TClassDescription - but I think I���ve misunderstood what I should do (and I guess from Pavel���s comment - I should really look at why that initial method was missing as it sounds like it should have worked - so maybe its an order loading thing?).Thanks, for helping by the way - this is proving very instructional.TimOn 3 Aug 2017, at 18:26, Mariano Martinez Peck <marianopeck@gmail.com> wrote:On Thu, Aug 3, 2017 at 2:14 PM, Tim Mackinnon <tim@testit.works> wrote:Hi Mariano - I compiled in the trait methods manually and it got further - but now I���m seeing another error - Error: Explicitly required method","\u001b[0mLambda class(Object)>>error:","explicitRequirement���,mmmm the stack is weird... it looks like if Class >> fuelAccept: would have the wrong implementation, that is, having the one from TClass:fuelAccept: aGeneralMapper^self explicitRequirement.Rather than the correct one:fuelAccept: aGeneralMapper^aGeneralMapper visitClass: selfMaybe the solution is to compile all those methods from traits BUT NOT those that are "^self explicitRequirement." because those will override the good methods.If that doesn't work, then maybe can you print to console the each impl (source) of each implementor of #fuelAccept: ?Thoughts?Any ideas?Tim"--- RUNNING ERROR HANDLER ---", "Error: Explicitly required method", "", "\u001b[0m\u001b[31mError: Explicitly required method", "\u001b[0mLambda class(Object)>>error:", "explicitRequirement", " self error: 'No decompiler available' in Lambda class(Object)>>explicitRequirement in Block: explicitRequirement...", "False>>ifFalse:", "Lambda class(Object)>>explicitRequire ment", "Lambda class(Class)>>fuelAccept:", "FLLightGeneralMapper>>mapAndT race:", "FLLightGlobalMapper>>mapAndTr ace:", "FLPluggableSubstitutionMapper >>mapAndTrace:", "FLAnalysis>>mapAndTrace:", "FLAnalysis>>run", "setDefaultAnalysis", " self error: 'No decompiler available' in FLAnalyzer>>setDefaultAnalysis in Block: setDefaultAnalysis...", "FLAnalyzer>>analysisFor:", "FLSerialization>>analysisStep ", "FLSerialization>>run", "setDefaultSerialization", " self error: 'No decompiler available' in FLSerializer>>setDefaultSerial ization in Block: setDefaultSerialization...", "serialize: t1 on: t2", " self error: 'No decompiler available' in FLSerializer>>serialize:on: in Block: serialize: t1 on: t2...", "on: t1 globalEnvironment: t2 do: t3", " self error: 'No decompiler available' in FLEncoder class>>on:globalEnvironment:do : in Block: on: t1 globalEnvironment: t2 do: t3...", "BlockClosure>>ensure:", "FLEncoder class>>on:globalEnvironment:do :", "FLSerializer>>serialize:on:", "NonInteractiveUIManager>>writ eFuelContext:", "Lambda class>>processDebug:", "Lambda class>>processJSON:", "Lambda class>>process:", "activate",