<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On 11.08.2009, at 20:11, Eliot Miranda wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">On Tue, Aug 11, 2009 at 9:44 AM, Bert Freudenberg <span dir="ltr">&lt;<a href="mailto:bert@freudenbergs.de">bert@freudenbergs.de</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> <div><div></div><div class="h5">On 11.08.2009, at 18:21, Eliot Miranda wrote:<br> <br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> On Sun, Aug 9, 2009 at 4:36 PM, Andreas Raab &lt;<a href="mailto:andreas.raab@gmx.de" target="_blank">andreas.raab@gmx.de</a>&gt; wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Hi -<br> <br> I have noticed several times that Monticello sometimes reports a different order of class variables than the one that's in the image and I think I finally found out what causes it. The problem seems to be that the MCClassDefinition is constructed from a Set of class var names (i.e., Delay classVarNames =&gt; a Set(#TimerEventLoop #SuspendedDelays #TimingSemaphore #ActiveDelayStartTime #ActiveDelay #FinishedDelay #ScheduledDelay #RunTimerEventLoop #AccessProtect) derived from the class' classPool.<br> <br> The thing is, the order in that class pool can differ. When you add or remove class var names, the names can get shuffled around and there is no telling what the exact enumeration order will be. Once the order is different it's a real pain because Monticello will always report differences but without a way to correct the issue.<br> <br> I'm wondering what possible fixes might be. In particular considering that reordering the class var names will mark any packages dirty for the same reasons.<br> </blockquote> <br> The fix we implemented at Cadence was to sort the classVars array when initializing an MCClassDefinition, which has the advantage of being really simple, but the downside of producing false positives for packages that have been stored with unsorted class vars. &nbsp;But this isn't the full fix. &nbsp;One should also sort the pool n ames. &nbsp;Fix attached.<br> <br> I think this is a better approach than ignoring sort order when comparing because it mimics the treatment of class definitions in the system, where class var names and pool names are also sorted.<br> </blockquote> <br> <br></div></div> It's not "better" but simply half of the solution, if we go by the "be generous on input, strict on output" rule. That is, always store sorted from now on, but accept unsorted (older) packages.</blockquote> <div><br></div><div>Agreed :)</div></div></blockquote><br></div><div>Fine. I dug out my fix for order-independent comparison from 2006, added your fix to *both* versions of the&nbsp;initialize method, and committed as Monticello-bf.316.</div><br><div> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Lucida Grande; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><div style="font-family: Helvetica; "><span class="Apple-style-span" style="font-family: Helvetica; ">- Bert -</span></div><br class="Apple-interchange-newline"></div></span> </div><br></body></html>