[squeak-dev] Logging from the Compiler

Frank Shearar frank.shearar at gmail.com
Mon Dec 9 19:34:27 UTC 2013


On 09 Dec 2013, at 0:10, Chris Muller <asqueaker at gmail.com> wrote:

> Move SystemChangeNotifier to Kernel.

Well that's certainly a step at least approximately forwards. It's not just SystemChangeNotifier that would need to move though: all of System-Change Notifications and System-Object Events would have to move too.

Which is why I'd prefer something that didn't bloat up Kernel. Because one day we'll have to untangle Kernel, too.

But it does at least rid several packages of their dependency on System.

frank

> Really, it's something not only the Compiler NEEDS, there's also
> ClassDescription and ClassOrganizer, and the uses are more than just
> incidental.
> 
> 
> On Sun, Dec 8, 2013 at 4:46 PM, Frank Shearar <frank.shearar at gmail.com> wrote:
>> Compiler depends on System because changing stuff - adding methods,
>> changing classes, etc. - sends messages to SystemChangeNotifier
>> uniqueInstance.
>> 
>> While convenient, it (a) is inflexible and (b) causes a cycle. The
>> correct relationship is that System uses Compiler.
>> 
>> With that in mind, _a_ solution to this problem is to log things
>> through a callback/registration mechanism of some kind. If you care
>> about logging, you create a Compiler, say "log here" and off you go.
>> (This means that you remove the log: part of a lot of methods in
>> Compiler - if you don't have a logger/loggers attached, nothing
>> happens, rather than logThis ifTrue: [] blocks. (Because you by
>> default have a null logger.))
>> 
>> Thoughts? Other possible approaches?
>> 
>> frank
>> 
> 


More information about the Squeak-dev mailing list