On Wed, Apr 15, 2009 at 09:59:13PM -0700, Andreas Raab wrote:
Hi -
I'm trying to make some modifications to Monticello and ran into an interesting issue: It appears that MC treats all definitions as a flat list and not structured in any way. E.g., MCMethodDefinitions are not contained inside the MCClassDefinitions that they apply to. Why is this?
I don't know if there was a good reason originally to do it this way. You'd have to ask Avi, the original auther. Colin might know too.
It seems to me that a bit more structure in MC could greatly help for a variety of issues: From being able to provide a class definition with extension methods (and consequently being able to load packages into images that don't even have the classes originally being extended) over various simplifications and speed improvements in dependency management (e.g., the dependency sorter doesn't need to sort definitions that are contained inside other definitions since the dependency is implicit).
Well, at least the issue with loading extensions when the class is not present is a non-issue. This already works fine in MC1.5. If the class is not present, the extension definitions are saved in limbo in the "Orphanage" until the class is eventually loaded.
I also don't think sorting speed is really an issue. In my experience, the speed bottlenecks in both loading and saving are:
PackageInfo image-scanning speed the number of become:'s that happen during loading.
I have heavily optimized both of these operations in mc1.6.
However, it feels like this may have been a conscious decision and I am wondering what the advantage is to treat all definitions as a flat list instead of using the existing dependencies like class/method hierarchies. I am very seriously considering to change this and would like to know more about the potential impact of such a change.
But if you changed it, you would lose compatability with other versions of monticello, as the file format would be significantly different.
I would say that MC1 should remain as it is with respect to file format. I would make changes like this in MC2 or DeltaStreams or something.