<br><br><div class="gmail_quote">On Thu, Apr 19, 2012 at 10:46 AM, Bert Freudenberg <span dir="ltr"><<a href="mailto:bert@freudenbergs.de">bert@freudenbergs.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I still don't quite understand how too many files could be open. But that's the error I saw at the VM level - and it only happens on Mac and Linux (which share the same file plugin code).<br></blockquote><div><br>
</div><div>Personally I don't like the <span class="Apple-style-span" style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px">CurrentReadOnlySourceFiles cacheDuring: idiom because it forces too many clients to be aware. Better is to make SourceFiles a self-contained object that maintains writeable and read-only files for sources and changes and have CompiledMethod ChangeRecord et al explicitly use the read-only files as appropriate. I did this in Newspeak images and it worked well.</span></div>
<div><span class="Apple-style-span" style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><br></span></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
- Bert -<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On 19.04.2012, at 10:36, Nicolas Cellier wrote:<br>
<br>
> Ah thanks, very useful.<br>
> I noticed the bug, suspected the origin but didn't had time to correct.<br>
><br>
> Nicolas<br>
><br>
> Le 19 avril 2012 18:36, <<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>> a écrit :<br>
>> Bert Freudenberg uploaded a new version of Monticello to project The Trunk:<br>
>> <a href="http://source.squeak.org/trunk/Monticello-bf.504.mcz" target="_blank">http://source.squeak.org/trunk/Monticello-bf.504.mcz</a><br>
>><br>
>> ==================== Summary ====================<br>
>><br>
>> Name: Monticello-bf.504<br>
>> Author: bf<br>
>> Time: 19 April 2012, 9:36:55.211 am<br>
>> UUID: 5fa1177d-b1ed-4cf0-8628-229f171ca814<br>
>> Ancestors: Monticello-eem.503<br>
>><br>
>> Fix intermittant load problem. We sometimes would get a 'changes file not found' in the middle of updating, but retrying found it just fine. I finally tracked it down to too many files being open. This change re-uses the same read-only copy during a package load (which additionally might speed up loading a tiny bit).<br>
>><br>
>> =============== Diff against Monticello-eem.503 ===============<br>
>><br>
>> Item was changed:<br>
>> ----- Method: MCPackageLoader>>basicLoad (in category 'private') -----<br>
>> basicLoad<br>
>> "Load the contents of some package. This is the core loading method<br>
>> in Monticello. Be wary about modifying it unless you understand the details<br>
>> and dependencies of the various entities being modified."<br>
>> | pkgName |<br>
>> errorDefinitions := OrderedCollection new.<br>
>> "Obviously this isn't the package name but we don't have anything else<br>
>> to use here. ChangeSet current name will generally work since a CS is<br>
>> usually installed prior to installation."<br>
>> pkgName := ChangeSet current name.<br>
>><br>
>> + [CurrentReadOnlySourceFiles cacheDuring: [[<br>
>> + "Pass 1: Load everything but the methods, which are collected in methodAdditions."<br>
>> - [["Pass 1: Load everything but the methods, which are collected in methodAdditions."<br>
>> additions do: [:ea |<br>
>> ea isMethodDefinition<br>
>> ifTrue:[methodAdditions add: ea asMethodAddition]<br>
>> ifFalse:[[ea load]on: Error do: [errorDefinitions add: ea]].<br>
>> ] displayingProgress: 'Reshaping ', pkgName.<br>
>><br>
>> "Try again any delayed definitions"<br>
>> self shouldWarnAboutErrors ifTrue: [self warnAboutErrors].<br>
>> errorDefinitions do: [:ea | ea load]<br>
>> displayingProgress: 'Reloading ', pkgName.<br>
>><br>
>> "Pass 2: We compile new / changed methods"<br>
>> methodAdditions do:[:ea| ea createCompiledMethod]<br>
>> displayingProgress: 'Compiling ', pkgName.<br>
>><br>
>> 'Installing ', pkgName displayProgressFrom: 0 to: 2 during:[:bar|<br>
>> "There is no progress *during* installation since a progress bar update<br>
>> will redraw the world and potentially call methods that we're just trying to install."<br>
>> bar value: 1.<br>
>><br>
>> "Pass 3: Install the new / changed methods<br>
>> (this is a separate pass to allow compiler changes to be loaded)"<br>
>> methodAdditions do:[:ea| ea installMethod].<br>
>><br>
>> "Pass 4: Remove the obsolete methods"<br>
>> removals do:[:ea| ea unload].<br>
>> ].<br>
>><br>
>> "Finally, notify observers for the method additions"<br>
>> methodAdditions do: [:each | each notifyObservers]<br>
>> "the message is fake but actually telling people how much time we spend<br>
>> in the notifications is embarrassing so lie instead"<br>
>> displayingProgress: 'Installing ', pkgName.<br>
>><br>
>> additions do: [:ea | ea postloadOver: (self obsoletionFor: ea)]<br>
>> displayingProgress: 'Initializing ', pkgName.<br>
>><br>
>> ] on: InMidstOfFileinNotification do: [:n | n resume: true]<br>
>> + ]] ensure: [self flushChangesFile]!<br>
>> - ] ensure: [self flushChangesFile]!<br>
>><br>
>><br>
><br>
<br>
<br>
<br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div><br>