Here's what just happened to me:
I cloned my base image (pre-configured squeak-dev), created a category and started coding. In particular I renamed a class I had just created. After a while my image locked up (*), so I killed Squeak and tried to recover my code from the last snapshot and the changes. Problem: the .changes don't know anything about that class rename. I see chunks adding methods to the class with the old name, and other chunks adding to the new name, but no rename nor remove-and-recreate-the-whole-class chunks. In the end I loaded the first changes, then renamed the class, then loaded the rest. I also had to touch and recompile a few methods because no instance variables were there. Bug? How are we supposed to recover code and be reasonably confident that it's complete and coherent? (*) just for fun, inspect this in a sacrificiable image: (ImageReadWriter formFromFileNamed: anExistingPngFileName) colorAt: aPointWithinTheBounds and edit the value of alpha then accept... -- Damien Pollet type less, do more [ | ] http://typo.cdlm.fasmz.org |
Well I don't think a rename will exist but you should see a change of one class to stop existing and a new class to begin existing. Unfortunately changes to the structure of the class (inst vars, class vars, pools) only show up with something like "class was changed", that is, the actual changes aren't recorded.
This is what I am trying to change with my first bounty project. I should have mentioned before, but Edgar won the bidding, and the project is under-way. On 8/3/07,
Damien Pollet <[hidden email]> wrote: Here's what just happened to me: |
Last time I had to look for such changes I'm pretty sure that class
name and shape changes were in the changes.log as DoIts. However I just ran a quick test and it seems that *nothing* got written out; if I didn't make a mistake then that would be A Very Bad Thing. tim -- tim Rowledge; [hidden email]; http://www.rowledge.org/tim Strange OpCodes: D: Detonate |
> Last time I had to look for such changes I'm pretty sure that class
> name and shape changes were in the changes.log as DoIts. However I > just ran a quick test and it seems that *nothing* got written out; if > I didn't make a mistake then that would be A Very Bad Thing. That class renames don't get logged in the changes is a very very old bug. It bugged me already years ago and I can't even remember a time when it worked. Lukas -- Lukas Renggli http://www.lukas-renggli.ch |
In reply to this post by timrowledge
Hrm, if you use the "undo changset" feature (or what ever it's called) on the change sorter it makes a big warning that it probably isn't going to work. I always assumed this was because of not enough information being stored about class changes. And my assumption came from the fact that it was these kinds of things that were not getting undone, as well as the fact that they don't show up in the change sorter.
On 8/4/07, tim Rowledge <[hidden email]> wrote: Last time I had to look for such changes I'm pretty sure that class |
In reply to this post by Lukas Renggli
Why does it need "rename" specifically? If change sets reliably show every class creation, update and deletion then applying a change set with a class rename will still work. You just wont be able to see as clearly that it was a rename (
i.e. rename is just delete one thing then add a new thing that is exactly the same but with a new name).
On 8/4/07, Lukas Renggli <[hidden email]> wrote: > Last time I had to look for such changes I'm pretty sure that class |
On 4-Aug-07, at 8:30 AM, Jason Johnson wrote: > Why does it need "rename" specifically? If change sets reliably > show every class creation, update and deletion then applying a > change set with a class rename will still work. You just wont be > able to see as clearly that it was a rename ( i.e. rename is just > delete one thing then add a new thing that is exactly the same but > with a new name). Unfortunately not. When renaming a class it is not deleted and recreated; it is simply renamed. As an illustration, I edited method, changed the name of the class and re-edited the same method; the below is what went into the changeslog. /Users/tim/Documents/Squeak/TPR-Squeak3.8.1-6747.image! !ClassBuilderFormatTests methodsFor: 'utilities' stamp: 'tpr 8/4/2007 09:20' prior: 34639308! makeNormalSubclassOf: aClass "testing class rename logging" subClass := aClass subclass: self subClassName instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Kernel-Tests-ClassBuilder'! ! !ClassBuilderFormatTestsRenamed methodsFor: 'utilities' stamp: 'tpr 8/4/2007 09:20' prior: 45481544! makeNormalSubclassOf: aClass "testing class rename logging again" subClass := aClass subclass: self subClassName instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Kernel-Tests-ClassBuilder'! ! No mention of renaming. If you tried to recover from this log you would have problems. In fact in the image I used for that experiment the worst possible thing happens - nothing! No error is raised, nothing appears in the transcript... I'm puzzled by having this memory of such things being logged though. Maybe I'm mis-remembering from much older images like ST80V2 ? tim -- tim Rowledge; [hidden email]; http://www.rowledge.org/tim Useful random insult:- His shared libraries aren't installed. |
Free forum by Nabble | Edit this page |