Hi Dave, hi all,<br>
<br>
please take a short look at this changeset that I would like to merge into the Trunk in order to fix the DoItTest for Windows. Currently, some of them fail because DoItFirst tries to re-open the source files.<br>
<br>
<b><font face="Bitmap DejaVu Sans" size="9">=============== Summary ===============</font></b><font face="Bitmap DejaVu Sans" size="9"><br>
<br>
Change Set:        DoItFirstAfterStartup<br>
Date:            10 January 2022<br>
Author:            Christoph Thiede<br>
<br>
This changeset fixes the DoItFirst tests on Windows by making sure that no attempt is made to re-open the source fiels while the image has already been started up. This is achieved by extracting FileDirectory startUpDefaultDirectory from FileDirectory startUp and only sending the latter from DoItFirst >> #parse:.<br>
<br>
</font><b><font face="Bitmap DejaVu Sans" size="9">=============== Diff ===============</font></b><font face="Bitmap DejaVu Sans" size="9"><br>
<br>
</font><b><font face="Bitmap DejaVu Sans" size="9">DoItFirst>>parse: {evaluating} · ct 1/10/2022 22:37 (changed)</font></b><font face="Bitmap DejaVu Sans" size="9"><br>
</font><font face="Bitmap DejaVu Sans" size="9">parse: argumentList<br>
    "Iterate over the argument list, creating actions blocks. Register each action<br>
    block in the actions dictionary, and collect a list of the actions blocks to be<br>
    evaluated now. If any action blocks will require files or directory initialization,<br>
    send the appropriate startUp messages. Answer the list of action blocks to<br>
    be evaluated."<br>
<br>
    | args listOfBlocks needsFiles needsDirectory |<br>
    needsFiles := needsDirectory := false.<br>
    args := argumentList readStream.<br>
    listOfBlocks := OrderedCollection new.<br>
    [ args atEnd ] whileFalse: [ | key |<br>
        (key := self keyFor: args next) caseOf: {<br>
            [ #help ] -> [ self addFirst: [ self help ] to: listOfBlocks at: key. needsFiles := true] .<br>
            [ #debug ] -> [ self addWithoutEvaluation: [ self debug ] at: key] .<br>
            [ #doit ] -> [ | list | list := self nextTokensFrom: args. self add:[ self doIt: list ] to: listOfBlocks at: key. needsFiles := true] .<br>
            [ #evaluate ] -> [ | arg | arg := args next.  self add:[ self evaluateOption: arg ] to: listOfBlocks at: key. needsFiles := true] .<br>
            [ #file ] -> [ | arg | arg := args next.  self add:[ self evaluateFileContents: arg ] to: listOfBlocks at: key. needsFiles := true] .<br>
            [ #filein ] -> [ | list | list := self nextTokensFrom: args. self add:[ self fileIn: list ] to: listOfBlocks at: key. needsFiles := needsDirectory := true] .<br>
            [ #cwd ] -> [ | arg | arg := args next.  self addFirst:[ self cwd: arg ] to: listOfBlocks at: key. needsFiles := needsDirectory := true] .<br>
        } otherwise: [] ].<br>
    needsFiles ifTrue: [ FileStream startUp: true. "initialize stdout and stderr" ].<br>
</font><s><font color="#0000FF"><font face="Bitmap DejaVu Sans" size="9">-     needsDirectory ifTrue: [ FileDirectory startUp "set default directory" ].<br>
</font></font></s><font color="#FF0000"><font face="Bitmap DejaVu Sans" size="9">+     needsDirectory ifTrue: [ FileDirectory startUpDefaultDirectory ].<br>
</font></font><font face="Bitmap DejaVu Sans" size="9">    ^ listOfBlocks.<br>
</font><font face="Bitmap DejaVu Sans" size="9"><br>
<br>
</font><b><font face="Bitmap DejaVu Sans" size="9">FileDirectory class>>startUp {name utilities} · ct 1/10/2022 22:37 (changed)</font></b><font face="Bitmap DejaVu Sans" size="9"><br>
</font><font face="Bitmap DejaVu Sans" size="9">startUp<br>
</font><s><font color="#0000FF"><font face="Bitmap DejaVu Sans" size="9">-     "Establish the platform-specific FileDirectory subclass. Do any platform-specific startup."<br>
-     self setDefaultDirectoryClass.<br>
</font></font></s><font face="Bitmap DejaVu Sans" size="9"><br>
</font><s><font color="#0000FF"><font face="Bitmap DejaVu Sans" size="9">-     self setDefaultDirectory: (self dirPathFor: Smalltalk imageName).<br>
- <br>
-     Preferences startInUntrustedDirectory <br>
-         ifTrue:[    "The SecurityManager may override the default directory to prevent unwanted write access etc."<br>
-                 self setDefaultDirectory: SecurityManager default untrustedUserDirectory.<br>
-                 "Make sure we have a place to go to"<br>
-                 DefaultDirectory assureExistence].<br>
</font></font></s><font color="#FF0000"><font face="Bitmap DejaVu Sans" size="9">+     self startUpDefaultDirectory.<br>
</font></font><font face="Bitmap DejaVu Sans" size="9">    Smalltalk openSourceFiles.<br>
</font><s><font color="#0000FF"><font face="Bitmap DejaVu Sans" size="9">-     (Smalltalk classNamed: #DoItFirst) ifNotNil: [ :doit | doit perform: #reevaluateCwd ].<br>
</font></font></s><font face="Bitmap DejaVu Sans" size="9"><br>
<br>
</font><b><font face="Bitmap DejaVu Sans" size="9">FileDirectory class>>startUpDefaultDirectory {name utilities} · ct 1/10/2022 22:37</font></b><font face="Bitmap DejaVu Sans" size="9"><br>
</font><font color="#FF0000"><font face="Bitmap DejaVu Sans" size="9">+ startUpDefaultDirectory<br>
+     "Establish the platform-specific FileDirectory subclass. Do any platform-specific startup."<br>
+ <br>
+     self setDefaultDirectoryClass.<br>
+     self setDefaultDirectory: (self dirPathFor: Smalltalk imageName).<br>
+ <br>
+     Preferences startInUntrustedDirectory <br>
+         ifTrue:[    "The SecurityManager may override the default directory to prevent unwanted write access etc."<br>
+                 self setDefaultDirectory: SecurityManager default untrustedUserDirectory.<br>
+                 "Make sure we have a place to go to"<br>
+                 DefaultDirectory assureExistence].<br>
+     <br>
+     (Smalltalk classNamed: #DoItFirst) ifNotNil: [ :doit | doit perform: #reevaluateCwd ].</font></font><font face="Bitmap DejaVu Sans" size="9"><br>
</font><br>
Best,<br>
Christoph<br>
<br>
<font color="#808080">---<br>
</font><font color="#808080"><i>Sent from </i></font><font color="#808080"><i><a href="https://github.com/hpi-swa-lab/squeak-inbox-talk"><u><font color="#808080">Squeak Inbox Talk</font></u></a></i></font><br>
["DoItFirstAfterStartup.1.cs"]