On Mon, 5 Dec 2011, Alexander Lazarević wrote:
2011/11/19 Nicolas Cellier nicolas.cellier.aka.nice@gmail.com:
SystemChangeFileTest>>#testClassAdded
We should correct this one.
This is a tricky issue. The test is failing, because SmalltalkImage >> #event: doesn't log class additions, the code is commented out. The reason why it's commented out is (probably) because otherwise the class creation is logged twice. The reason for the double logging is that Browser >> #defineClass:notifying: forces logging while it evaluates the class definition, so a DoIt is also written to the changes file. Changing the evaluation code to
class := oldClass subclassDefinerClass evaluate: defString notifying: aController logged: false.
solves this issue. But what will happen when you create a class in a workspace? It will be logged twice. Once by the class addition and once by the DoIt.
I think double logging is not a real issue. It may slow things down a bit when you're recovering from the changes, and make your changes file a bit larger, but it's better to log it twice, than none, which is the current case, when you create a class from code.
So, I suggest uncommenting the logging of class additions in SmalltalkImage >> #event:, then turning off logging in Browser >> #defineClass:notifying:. Any objections?
Levente
I still have some bits that I hopefully find time tonight to commit. When was that codefreeze exactly?
Note that I don't much like the usage of file 'temp.changes', i sometimes happen to have such files in use...
True! That's already changed.
Alex