tpermutt@eng.umd.edu (Thomas Permutt) (02/06/91)
Why does compressChanges remove class definitions from the change log? More importantly, how do people work around this? It seems to me that the change log contains three kinds of information needed to restore, say, a crashed system: methods, assignments to global and pool variables, and definitions of new or modified classes. Methods are kept by compressChanges. Essential global assignments tend to be few, and a lot of the garbage that should get compressed out consists of inessential global assignments, so I am willing to keep track of these myself: I can always define a method setAllGlobals to preserve a record of these in the change log if I want. But what am I supposed to do about class definitions? Look through the change log and write them all down before compressing? Modify the subclass: method to make a separate log of them? Seems like it ought to be more automatic. Am I missing something?
john@utafll.uta.edu (John Baima) (02/06/91)
In article <1991Feb5.202908.3106@eng.umd.edu> tpermutt@eng.umd.edu (Thomas Permutt) writes:
Why does compressChanges remove class definitions from the change log?
More importantly, how do people work around this?
[ etc ]
ParcPlace ST-80 used to have this on their bug list. Now it is just a
feature :-) I have never found a very good workaround. It seems that
one has to file out your source code before compressing changes. To
recover, the fileouts have to be filed in and then use the change log.
I find this "feature" most annoying.
--
John Baima
john@utafll.uta.edu
new@ee.udel.edu (Darren New) (02/06/91)
In article <JOHN.91Feb5164039@utafll.utafll.uta.edu> john@utafll.uta.edu (John Baima) writes: >ParcPlace ST-80 used to have this on their bug list. Now it is just a >feature :-) Hmmm... I'll look around, but I think I have a goodie somewhere that makes this back into a bug :-). -- Darren -- --- Darren New --- Grad Student --- CIS --- Univ. of Delaware --- ----- Network Protocols, Graphics, Programming Languages, Formal Description Techniques (esp. Estelle), Coffee, Amigas ----- =+=+=+ Let GROPE be an N-tuple where ... +=+=+=
mario@cs.man.ac.uk (Mario Wolczko) (02/07/91)
In article <1991Feb5.202908.3106@eng.umd.edu>, tpermutt@eng.umd.edu (Thomas Permutt) writes: > Why does compressChanges remove class definitions from the change log? > More importantly, how do people work around this? This goodie, available on the Manchester Goodies Server, may help out. enhanced-condense-changes.st (2.3) Neil Dyer The standard method of condensing the changes file loses all changes to class definitions and all new class definitions. This means an image cannot be rebuilt from a condensed changes file. The changes here cause class definitions to be placed on the condensed changes file as changes (in super class order). Its slower because the changes file has to be scanned, but then how often do you condense your changes files. It's for VI2.3, and so may not work with your version. If you verify it does, or fix it if it doesn't, please let me know. To get more information about the archive, send a message like this: To: goodies-lib@cs.man.ac.uk Subject: help ; index Mario Wolczko ______ Dept. of Computer Science Internet: mario@cs.man.ac.uk /~ ~\ The University uucp: mcsun!ukc!man.cs!mario ( __ ) Manchester M13 9PL JANET: mario@uk.ac.man.cs `-': :`-' U.K. Tel: +44-61-275 6146 (FAX: 6280) ____; ;_____________the mushroom project___________________________________
MUHRTH@tubvm.cs.tu-berlin.de (Thomas Muhr) (02/09/91)
There is a goodie in the Digitalk forum at Compuserve that should solve this problem. - Thomas
timm@runx.oz.au (Tim Menzies) (02/09/91)
In article <1991Feb5.202908.3106@eng.umd.edu> tpermutt@eng.umd.edu (Thomas Permutt) writes: >Why does compressChanges remove class definitions from the change log? >More importantly, how do people work around this? The following code generates a file "deltas.hdr" with all the class definitions of classes with changed methods. If this file is loaded before a compressed change.log, then the system status can be fully recreated from an off-the-shelf copy of Smalltalk. usage: select 'save code' from the Screen dispatcher/exit smalltalk menu. -- _--_|\ Tim Menzies (timm@runxtsa.oz) "Of course employers like grads. / \ HiSoft Expert Systems Group, A degree proves that you can \_.--._/ 2-6 Orion Rd, Lane Cove, NSW, 2066 do what you're told year after v 61 2 9297729(voice),61 2 4280200(fax) year after year after ..." --- cut here --- ! SystemDictionary methods ! storeHeaders "write the class definition of all classes with changed methods to a disc file. !!!! tjm 6-2-91" |headerFile| Scheduler clearScreen. 'Writing headers of changed classes to disc ..' displayAt: 8 @ 9 * SysFont charSize. headerFile := Directory current newFile: 'deltas.hdr'. self getSourceClasses do: [ :class | (self changedClass: class) ifTrue: [class fileOutOn: headerFile. headerFile nextPutAll: ' !!'; cr.]]. headerFile close. Scheduler displayAll. ! changedClass: aClass "Return true if aClass contains changed methods. !!!! tjm 6-2-91" aClass selectors asSortedCollection do: [ :s | (aClass compiledMethodAt: s) sourceIndex = 2 ifTrue: [^true]]. aClass class selectors asSortedCollection do: [ :s | (aClass class compiledMethodAt: s) sourceIndex = 2 ifTrue: [^true]]. ^false ! ! ! ScreenDispatcher methods ! exit "Pop-up the exit menu." (Menu labels: 'forget image continue save image save code' lines: #( 1 2) selectors: #(forgetImage continue saveExit saveWorkThenExit)) popUpAt: Cursor offset for: self ! saveWorkThenExit self saveWork; forgetImage. ! saveWork CursorManager execute change. Smalltalk storeHeaders; compressChanges. CursorManager normal change. ! !