[Cuis-dev] [Ann] Refinements to Exception handling

Juan Vuletich juan at jvuletich.org
Mon Oct 14 04:04:31 PDT 2019


On 10/13/2019 9:33 PM, Phil B via Cuis-dev wrote:
> Yep there's some weird stuff out there.  I don't think that should 
> discourage the change as I agree with the logic of your objection.  I 
> just suspect there's more to be done in preparation for the change 
> before actually making it.  (i.e. in addition to the core image, 
> shouldn't all the packages in the Cuis repo also be fixed before 
> flipping the switch?)
>
> I'm raising the flag because 'save as' was literally the first thing I 
> tried after applying updates.  My cursory glance tells me this is 
> going to be painful before my own code is even involved...
>

I just checked that all BaseImageTests.pck.st pass. Obviously it was not 
enough.

> On Sun, Oct 13, 2019 at 8:27 PM Andres Valloud via Cuis-dev 
> <cuis-dev at lists.cuis.st <mailto:cuis-dev at lists.cuis.st>> wrote:
>
>     Yeah, I was just looking at that, pondering this bit:
>
>             | wasCog isCog |
>             isCog _ Smalltalk isRunningCog.
>             [ wasCog _ self imageFormatVersionFromFile allMask: 1 ]
>                     on: Error
>                     do: [ :ignore |
>                             "probably save-as to non-existing file"
>                             ^ true ].
>
>     Obviously, everybody knows that's what the error was, probably :P.
>
>     Andres.
>
>     On 10/13/19 17:25, Phil B wrote:
>     > Just did a quick look at senders of #on:do: and found these:
>     >
>     > AndreasSystemProfiler>canWork
>     > Browser>contents:notifying:
>     > FeatureRequirement>require
>     > FeatureRequirement>satisfyRequirementsAndInstall
>     > MethodNode>generatePreSpur:using:
>     > MethodNode>generateSpur:using:
>     > RefactoringApplier>createAndValueHandlingExceptions:
>     > SmalltalkEditor>renameTemporary:
>     > SmalltalkEditor>withClassDefinitionNodeAndClassDo:ifErrorsParsing:
>     > SmalltalkEditor>withMethodNodeAndClassDo:ifErrorsParsing:
>     > SystemDictionary>okayToSave
>     >
>     > That's ~15% of #on:do: senders in the base image *directly*
>     returning
>     > within the block.  (i.e. I didn't check any of the blocks passed as
>     > parameters which might also do so or any of the other ways this
>     might
>     > occur)  I don't think this change is fully baked...
>     >
>     >
>     > On Sun, Oct 13, 2019 at 8:00 PM Phil B <pbpublist at gmail.com
>     <mailto:pbpublist at gmail.com>
>     > <mailto:pbpublist at gmail.com <mailto:pbpublist at gmail.com>>> wrote:
>     >
>     >     It looks like we have at least some changes in the core image to
>     >     resolve.  World menu->Save as... now fails.  Has a scan of
>     the image
>     >     been done to identify where these cases might be buried?
>     >
>     >     On Sun, Oct 13, 2019 at 9:48 AM Juan Vuletich via Cuis-dev
>     > <cuis-dev at lists.cuis.st <mailto:cuis-dev at lists.cuis.st>
>     <mailto:cuis-dev at lists.cuis.st <mailto:cuis-dev at lists.cuis.st>>>
>     wrote:
>     >
>     >         Hi Folks,
>     >
>     >         Some time ago, Andrés (with just a tad of help from me)
>     fixed a
>     >         problem
>     >         in Exception handling. If exception handler blocks do
>     non-local
>     >         return
>     >         (^stuff), they will skip execution of part of the Exception
>     >         handling
>     >         system code, breaking exception return values and
>     possibly other
>     >         'bad
>     >         things'.
>     >
>     >         I just pushed to GitHub a few updates with this work.
>     Now, if an
>     >         exception handler does a non-local return, an Error will be
>     >         raised. We
>     >         also fixed a couple of places in the image where this
>     was being
>     >         done.
>     >         BaseImageTests pass.
>     >
>     >         This updates have some risk of breaking your code. If
>     you you
>     >         get this
>     >         error: 'Exception handler blocks must not do non local
>     returns',
>     >         then
>     >         you need to adjust your code. See updates #3917 to #3922
>     for the
>     >         changes
>     >         done to the base image.
>     >
>     >         Thanks,
>     >
>     >         --
>     >         Juan Vuletich
>     > www.cuis-smalltalk.org <http://www.cuis-smalltalk.org>
>     <http://www.cuis-smalltalk.org>
>     > https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
>     > https://github.com/jvuletich
>     > https://www.linkedin.com/in/juan-vuletich-75611b3
>     >         @JuanVuletich
>     >
>     >         --
>     >         Cuis-dev mailing list
>     > Cuis-dev at lists.cuis.st <mailto:Cuis-dev at lists.cuis.st>
>     <mailto:Cuis-dev at lists.cuis.st <mailto:Cuis-dev at lists.cuis.st>>
>     > https://lists.cuis.st/mailman/listinfo/cuis-dev
>     >
>     -- 
>     Cuis-dev mailing list
>     Cuis-dev at lists.cuis.st <mailto:Cuis-dev at lists.cuis.st>
>     https://lists.cuis.st/mailman/listinfo/cuis-dev
>

Thanks,

-- 
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
@JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20191014/312965c2/attachment.htm>


More information about the Cuis-dev mailing list