Store Load Error when Pulling Up Instance Variable

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Store Load Error when Pulling Up Instance Variable

Runar Jordahl
I get an error when loading a version of a package where the loaded
version moves one instance variable up to a super-class. Here is how
to reproduce the problem:

Make a package P
Make new class A as a subclass of Object
Make new class B as a subclass of A
Add instance variable #name to B.
Publish P version 1

Move (pull up) instance variable #name from B to A.
Publish P version 2

Load version 1

If you now try to load version 2, Store fails. I include part of the
call trace below.

The problem is that A is tried to be compiled first. Store does a
#superclassOrder: to load the super-classes first. A is compiled
before B, so at compilation time both A and B has instance variable
#name. This fails.

Now, I know that in the browser I can actually make both A and B have
instance variable #name. The browser complains, but I am able to
continue. Maybe Store should use another way of compiling the classes?
It currently does "Object evaluatorClass evaluate: aString notifying:
nil logged: logFlag" to compile.

Kind regards
Runar Jordahl

Unhandled exception: Message not understood: #comment
UndefinedObject(Object)>>doesNotUnderstand:
Store.ClassRecord class>>commentFor:
Store.ClassRecord(Store.DefinedRecord)>>loadCommentFor:
Store.ClassRecord>>loadSrcInto:
optimized [] in Store.PackageDifferences>>loadFromDBWithin:
OrderedCollection>>do:
Store.PackageDifferences>>loadFromDBWithin:
optimized [] in [] in Store.Package>>doDiffSourceLoad:within:
BlockClosure>>on:do:
optimized [] in Store.Package>>doDiffSourceLoad:within:
optimized [] in [] in [] in Notice class>>showProgress:complete:while:title:
BlockClosure>>ensure:
Cursor>>showWhile:
optimized [] in [] in Notice class>>showProgress:complete:while:title:
BlockClosure>>on:do:
optimized [] in Notice class>>showProgress:complete:while:title:
BlockClosure>>ensure:
Notice class>>showProgress:complete:while:title:
Store.Package>>doDiffSourceLoad:within:
optimized [] in [] in Store.Package>>sourceLoadFromDBloadWithin:warnReplace:
optimized [] in Store.XMainChangeSet class>>ignoreMainChangesWhile:
BlockClosure>>ensure:
Store.XMainChangeSet class>>ignoreMainChangesWhile:
optimized [] in Store.Package>>sourceLoadFromDBloadWithin:warnReplace:
optimized [] in Store.BasicPackagePolicy>>forcePackage:while:
BlockClosure>>ensure:
Store.BasicPackagePolicy>>forcePackage:while:
Store.Package>>sourceLoadFromDBloadWithin:warnReplace:
Store.Package>>loadWithin:useBinIfAvailable:warnReplace:

Reply | Threaded
Open this post in threaded view
|

Re: Store Load Error when Pulling Up Instance Variable

Alan Knight-2
Thanks. I've created AR 50995 for this.

At 10:16 AM 7/12/2006, Runar Jordahl wrote:

>I get an error when loading a version of a package where the loaded
>version moves one instance variable up to a super-class. Here is how
>to reproduce the problem:
>
>Make a package P
>Make new class A as a subclass of Object
>Make new class B as a subclass of A
>Add instance variable #name to B.
>Publish P version 1
>
>Move (pull up) instance variable #name from B to A.
>Publish P version 2
>
>Load version 1
>
>If you now try to load version 2, Store fails. I include part of the
>call trace below.
>
>The problem is that A is tried to be compiled first. Store does a
>#superclassOrder: to load the super-classes first. A is compiled
>before B, so at compilation time both A and B has instance variable
>#name. This fails.
>
>Now, I know that in the browser I can actually make both A and B have
>instance variable #name. The browser complains, but I am able to
>continue. Maybe Store should use another way of compiling the classes?
>It currently does "Object evaluatorClass evaluate: aString notifying:
>nil logged: logFlag" to compile.
>
>Kind regards
>Runar Jordahl
>
>Unhandled exception: Message not understood: #comment
>UndefinedObject(Object)>>doesNotUnderstand:
>Store.ClassRecord class>>commentFor:
>Store.ClassRecord(Store.DefinedRecord)>>loadCommentFor:
>Store.ClassRecord>>loadSrcInto:
>optimized [] in Store.PackageDifferences>>loadFromDBWithin:
>OrderedCollection>>do:
>Store.PackageDifferences>>loadFromDBWithin:
>optimized [] in [] in Store.Package>>doDiffSourceLoad:within:
>BlockClosure>>on:do:
>optimized [] in Store.Package>>doDiffSourceLoad:within:
>optimized [] in [] in [] in Notice class>>showProgress:complete:while:title:
>BlockClosure>>ensure:
>Cursor>>showWhile:
>optimized [] in [] in Notice class>>showProgress:complete:while:title:
>BlockClosure>>on:do:
>optimized [] in Notice class>>showProgress:complete:while:title:
>BlockClosure>>ensure:
>Notice class>>showProgress:complete:while:title:
>Store.Package>>doDiffSourceLoad:within:
>optimized [] in [] in Store.Package>>sourceLoadFromDBloadWithin:warnReplace:
>optimized [] in Store.XMainChangeSet class>>ignoreMainChangesWhile:
>BlockClosure>>ensure:
>Store.XMainChangeSet class>>ignoreMainChangesWhile:
>optimized [] in Store.Package>>sourceLoadFromDBloadWithin:warnReplace:
>optimized [] in Store.BasicPackagePolicy>>forcePackage:while:
>BlockClosure>>ensure:
>Store.BasicPackagePolicy>>forcePackage:while:
>Store.Package>>sourceLoadFromDBloadWithin:warnReplace:
>Store.Package>>loadWithin:useBinIfAvailable:warnReplace:

--
Alan Knight [|], Cincom Smalltalk Development
[hidden email]
[hidden email]
http://www.cincom.com/smalltalk

"The Static Typing Philosophy: Make it fast. Make it right. Make it run." - Niall Ross