Hi Paul, I will answer just in case others may find the same issue in the future. As you know, at the time of loading a class side #initialize, Monticello checks if it has already been run or not and only run if it is has not. Re-initializing seaside (re-sending class side initialize) is the problem as it brings problems like the one you mention. The problem is that during the GemStone upgrade, the Monticello caches are cleared. But Seaside code is still there. So...when you try to load Seaside again in a upgraded stone, the Monticello cache is empty and hence all class #initialize are executed again in a env where they HAD already been initialized before (hence the problem). The solution I found is to re-load all my app (and seaside) in a way of NOT executing class side #initialize. This must be done only once as this will fill monticello cache and next times it will not try to run #initialize (unless the method source has changed): GsDeployer deploy: [ [ [ [ Metacello new configuration: 'MyApp'; repository: 'http://smalltalkhub.com/mc/MyApp/MyApp/main'; version: '1.6'; get; onConflictUseIncoming: #('Seaside3') useLoaded: #('Grease'); onUpgrade: [ :ex :loaded :incoming | incoming baseName = 'XMLSupport' ifTrue: [ "I could use #useLoaded but the one currently coming with GemStone has a broken versionString." ex allowEvenIfLocked ] ifFalse: [ "default" ex useIncoming ] ]; load: #('MyPackages') ] on: MCPerformPostloadNotification do: [ :ex | (ex postloadClass name beginsWith: 'WA') ifTrue: [ Transcript show: ' Skipping class side initialization of ' , ex postloadClass name asString. ex resume: false ] ifFalse: [ ex resume: true ] ] ] on: Warning do: [ :ex | Transcript cr; cr; show: '===================================================='; cr; show: ex description; cr; cr; show: '===================================================='; cr. ex resume ] ] ensure: [ System performOnServer: 'rm -rf /tmp/curl*; rm -rf /tmp/github*; rm -rf /tmp/*tmpgithub*; rm -rf /tmp/zip.err' ] ]. System commitTransaction The important part is the error block for MCPerformPostloadNotification (which is sent when it is about to run class side #initialize). Once above code has been run (once), then you can load again your code in the normal way. Dale, we should add this seaside re-load to the upgradeSeaside script... Cheers, On Thu, Mar 24, 2016 at 1:41 AM, Paul DeBruicker <[hidden email]> wrote:
_______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
Good point - issue created[1]
[1] https://github.com/GsDevKit/GsDevKit_home/issues/88 On 3/24/16 5:32 AM, Mariano Martinez
Peck wrote:
_______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
Free forum by Nabble | Edit this page |