[Glass] ConfigurationOf vs. upgradeSeasideImage
Ken Treis via Glass
glass at lists.gemtalksystems.com
Thu Feb 8 10:30:15 PST 2018
Thanks, Dale. It turns out I was premature in declaring victory yesterday, and the "needs recompile" error is still happening even with my triumphal "fix".
Should I be using the upgradeStone script from GsDevKit rather than the upgradeSeasideImage script in the official GS 64-bit distribution? I'm not using GsDevKit / tODE on this project yet, but migration to tODE is a near-term goal.
--
Ken Treis
Miriam Technologies, Inc.
(866) 652-2040 x221
> On Feb 7, 2018, at 6:18 PM, Dale Henrichs via Glass <glass at lists.gemtalksystems.com> wrote:
>
> Ken,
>
> I suggest that you take a look at the GsDevKit_home upgradeStone script[1] for inspiration. That sounds like a familiar problem and I'm pretty sure that I've addressed that issue plus others in the upgradeStone script.
>
> Dale
> [1] https://github.com/GsDevKit/GsDevKit_home/blob/master/bin/upgradeStone#L192 <https://github.com/GsDevKit/GsDevKit_home/blob/master/bin/upgradeStone#L192>
>
> On 02/07/2018 05:08 PM, Ken Treis via Glass wrote:
>> I'm working on upgrading a system from 3.2.15 to 3.3.5 and hit a snag. I'm not sure if this is a bug in upgradeSeasideImage or just an odd quirk of our setup.
>>
>> When upgradeSeasideImage tries to auto-detect ConfigurationOfX classes to remove, it is apparently deciding to include the base `ConfigurationOf` class from Metacello in its list of removals. The script ends up loading it fresh, removing it, and then bombing when one of the packages triggers `ConfigurationOf class>>ensureMetacello`.
>>
>> I worked around this by building my #BootstrapExistingConfigurationList that omitted ConfigurationOf, and then the upgradeSeasideImage script completed without errors.
>>
>> Here are some highlights from the upgradeTo3x.log leading up to the failure:
>>
>>> Automatically generating list of loaded configuration classes to be removed:
>>> ConfigurationOfGLASS
>>> ConfigurationOfFileTree
>>> ConfigurationOfGofer
>>> ConfigurationOfGsSqueakCommon
>>> ConfigurationOfGrease
>>> ConfigurationOfGsMisc
>>> ConfigurationOfGsOB
>>> ConfigurationOfGoferProjectLoader
>>> ConfigurationOfGsMonticello
>>> ConfigurationOfGsCore
>>> ConfigurationOf
>>> ConfigurationOfZincHTTPComponents
>>> ConfigurationOfSeaside3
>>> ConfigurationOfMetacello
>>
>>
>> [snipped]
>>
>>> loading 'Metacello-Base-dkh.103.mcz'
>>> class created: 'ConfigurationOf'
>>
>>
>> [snipped]
>>
>>> BootstrapExistingConfigurationList do: [:class | class removeFromSystem ].
>>
>>
>> […]
>>
>>> --transcript--'Loaded -> ConfigurationOfGsSqueakCommon-dkh.25 --- upgrade.weco-write.com <http://upgrade.weco-write.com/>:/opt/gemstone/product/seaside/monticello/repository --- cache'
>>> -----------------------------------------------------
>>> GemStone: Error Nonfatal
>>> a ImproperOperation occurred (error 2142), Cannot execute method, 'method needs recompile, ConfigurationOf class >> ensureMetacello , oop 36494597889'
>>> Error Category: 231169 [GemStone] Number: 2142 Arg Count: 2 Context : 69194451969 exception : 72186891777
>>> Arg 1: [72186892033 sz:82 cls: 74753 String] method needs recompile, ConfigurationOf class >> ensureMetacello , oop 36494597889
>>> Arg 2: [20 sz:0 cls: 76289 UndefinedObject] nil
>>> ERROR: UNEXPECTED ERROR
>>> topaz> time
>>> 02/07/2018 10:47:24.935 PST
>>> topaz > exec iferr 1 : stk
>>> ==> 1 ImproperOperation (AbstractException) >> _signalFromPrimitive: @7 line 15 [methId 56587946753]
>>> 2 ConfigurationOfGsSqueakCommon >> project @1 line 1 [methId 72117275905]
>>
>>
>> Again, this might be just a quirk of my setup… but it seems (in my limited understanding) that the upgrade wouldn't need to remove ConfigurationOf after having just loaded it.
>>
>> In case anybody else needs the workaround, I just copied the auto-generation code from the log, hacked it as follows, and used it to set #BootstrapExistingConfigurationList explicitly before running `upgradeSeasideImage`:
>>
>>> "Patched code from upgradeSeasideImage (to avoid removing base ConfigurationOf class)"
>>> GsFile gciLogServer: 'Automatically generating list of loaded configuration classes'.
>>> UserGlobals at: #BootstrapExistingConfigurationList put: OrderedCollection new.
>>> UserGlobals associationsDo: [:assoc |
>>> assoc value isBehavior
>>> ifTrue: [
>>> ((assoc key asString _findString: 'ConfigurationOf' startingAt: 1 ignoreCase: false) == 1 and: [assoc key ~= #ConfigurationOf])
>>> ifTrue: [
>>> GsFile gciLogServer: ' ', assoc key asString.
>>> (UserGlobals at: #BootstrapExistingConfigurationList) add: assoc value ]
>>> ].
>>> ].
>>
>> --
>> Ken Treis
>> Miriam Technologies, Inc.
>> (866) 652-2040 x221
>>
>>
>>
>>
>> _______________________________________________
>> Glass mailing list
>> Glass at lists.gemtalksystems.com <mailto:Glass at lists.gemtalksystems.com>
>> http://lists.gemtalksystems.com/mailman/listinfo/glass <http://lists.gemtalksystems.com/mailman/listinfo/glass>
>
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20180208/6c639603/attachment-0001.html>
More information about the Glass
mailing list