<div dir="ltr"><div>System-fn.1066 [1] partially reverts this change to unblock trunk builds until we come up with a better solution.</div><div><br></div><div>Cheers,</div><div>Fabio</div><div><br></div>[1] <a href="http://forum.world.st/The-Trunk-System-fn-1066-mcz-td5099599.html">http://forum.world.st/The-Trunk-System-fn-1066-mcz-td5099599.html</a><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 14, 2019 at 1:45 PM David T. Lewis <<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Yes we probably do need another method in that case. And maybe some<br>
unit tests to document it.<br>
<br>
Should I revert the change, or is it ok to leave it in trunk for<br>
the time being? It if is causing problems (e.g. for students or<br>
for people doing presentations) then I would want to revert.<br>
<br>
Dave<br>
<br>
On Tue, May 14, 2019 at 12:27:25PM +0200, <a href="mailto:patrick.rein@hpi.uni-potsdam.de" target="_blank">patrick.rein@hpi.uni-potsdam.de</a> wrote:<br>
> Hi everyone,<br>
> <br>
> this breaks loading scripts on some platforms as Url>>#newFromRelativeText: is not a replacement for URI>>#resolveRelativeURI:. The old one can deal with absolute URLs, the new one just concatenates the two Urls. Now the question is where to fix this. The relative in the name is misleading so maybe we need another method.<br>
> <br>
> Bests,<br>
> Patrick<br>
> <br>
> >David T. Lewis uploaded a new version of System to project The Trunk:<br>
> ><a href="http://source.squeak.org/trunk/System-dtl.1064.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/trunk/System-dtl.1064.mcz</a><br>
> ><br>
> >==================== Summary ====================<br>
> ><br>
> >Name: System-dtl.1064<br>
> >Author: dtl<br>
> >Time: 13 May 2019, 7:06:32.400119 pm<br>
> >UUID: 66a39f74-a4b5-41d0-8e02-c0d01632080d<br>
> >Ancestors: System-pre.1063<br>
> ><br>
> >Use Url rather than deprecated URI in ProjectLauncher>>startUpAfterLogin.<br>
> >This prevents command line startup scripts from failing due to a deprecation warning.<br>
> >Also fix a comment typo.<br>
> ><br>
> >=============== Diff against System-pre.1063 ===============<br>
> ><br>
> >Item was changed:<br>
> >  ----- Method: CodeLoader>>allButShebangLine: (in category 'private') -----<br>
> >  allButShebangLine: contentsString<br>
> >+    "If contentsString begins with '#!!' then assume that it contains a Unix<br>
> >-    "If tontentsString begins with '#!!' then assume that it contains a Unix<br>
> >     shebang line should be skipped prior to evaluating the contents."<br>
> >     <br>
> >     (contentsString beginsWith: '#!!')<br>
> >             ifTrue: [contentsString lineIndicesDo: [:line :end :endOfLine |<br>
> >                     ^ contentsString allButFirst: endOfLine ]]<br>
> >             ifFalse: [^ contentsString]<br>
> >  <br>
> >     " CodeLoader new allButShebangLine:<br>
> >  '#!!/usr/llocal/bin/squeak --<br>
> >  Transcript cr; show: ''Hello world!!''<br>
> >  ' "!<br>
> ><br>
> >Item was changed:<br>
> >  ----- Method: ProjectLauncher>>startUpAfterLogin (in category 'running') -----<br>
> >  startUpAfterLogin<br>
> >     | scriptName loader isUrl |<br>
> >     self setupFlaps.<br>
> >     Preferences readDocumentAtStartup<br>
> >             ifTrue: [scriptName := Smalltalk documentPath<br>
> >                                             ifNil: [''].<br>
> >                     scriptName := scriptName convertFromSystemString.<br>
> >                     scriptName isEmpty<br>
> >                             ifFalse: ["figure out if script name is a URL by itself"<br>
> >                                     isUrl := (scriptName asLowercase beginsWith: 'http://')<br>
> >                                                             or: [(scriptName asLowercase beginsWith: 'file://')<br>
> >                                                                             or: [scriptName asLowercase beginsWith: 'ftp://']].<br>
> >                                     isUrl<br>
> >                                             ifFalse: [| encodedPath pathTokens |<br>
> >                                                     "Allow for ../dir/scriptName arguments"<br>
> >                                                     pathTokens := scriptName splitBy: FileDirectory slash.<br>
> >                                                     pathTokens := pathTokens<br>
> >                                                                             collect: [:s | s encodeForHTTP].<br>
> >                                                     encodedPath := pathTokens<br>
> >                                                                             reduce: [:acc :each | acc , FileDirectory slash , each].<br>
> >+                                                    scriptName := (FileDirectory default asUrl newFromRelativeText: encodedPath) asString]]]<br>
> >-                                                    scriptName := (FileDirectory default uri resolveRelativeURI: encodedPath) asString]]]<br>
> >             ifFalse: [scriptName := ''].<br>
> >     scriptName isEmptyOrNil<br>
> >             ifTrue: [^ Preferences eToyFriendly<br>
> >                             ifTrue: [self currentWorld addGlobalFlaps]].<br>
> >     loader := CodeLoader new.<br>
> >     loader<br>
> >             loadSourceFiles: (Array with: scriptName).<br>
> >     (scriptName asLowercase endsWith: '.pr')<br>
> >             ifTrue: [self installProjectFrom: loader]<br>
> >             ifFalse: [loader installSourceFiles]!<br>
> ><br>
> ><br>
> <br>
<br>
</blockquote></div>