[Cuis-dev] On the changes to detect method returns in exception handlers

Phil B pbpublist at gmail.com
Tue Oct 15 17:19:23 PDT 2019


Juan,

It looks like 3923 still alters Exception behavior which may break some
existing code.  (granted, in rare situations)  I was working on adding a
#nonLocalReturn: method and nothing was working so I went back to a clean
3923 image and immediately saw why.  To reproduce:

1) Download https://github.com/pbella/OMeta-Cuis
2) Open a fresh 3923 image
3) Be sure to CLOSE the Transcript window for performance reasons.  There
will be a <cough> few warning messages emitted.  (~36k of them[1])
4) Open a file browser
5) Navigate to the repo directory and install OMeta2Tests.pck.st
6) Open a Browser window
7) Navigate to OMeta2>>char (browsing any OMeta method will probably do it
since, in order to do syntax highlighting for the browser, it has to fire
off an OMeta parser which in turn uses exception blocks with non-local
returns extensively)

At this point your image should hang while working its way to OOM.  I'd
venture that one or more of OMeta's assumptions about exceptions are no
longer valid.  OMeta is my problem to fix but I just wanted to make you
aware that even the 'quieter' code in 3923 can have both performance and
functional impact.

[1] A attempted full rebuild of my dev image resulted in >2M messages
before I killed it and disabled the message.

Thanks,
Phil

On Mon, Oct 14, 2019 at 8:41 AM Juan Vuletich via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:

> Hi Folks,
>
> As you have already seen in a separate thread, yesterday I pushed
> changes to Exceptions. While the changes are valuable, especially in the
> discussion they have triggered, and in showing an opportunity to improve
> non-trivial parts of the system, I pushed them without required previous
> discussion, and a better analysis of the immediate negative consequences
> in code breakage. I made this mistake all by myself, in a rush to try to
> get the code out even if I didn't have the time to do it in a better
> way. I apologize for this.
>
> I also want to thank you all, especially Hernán, Phil, and Andrés, for
> the constructive attitude in which you engaged in the relevant
> discussion on how to better deal with the issue, instead of focusing on
> the annoyance, I'm sure we'll be able to improve the system after this
> discussion.
>
> To avoid code breakage while we work out what we collectively want to do
> with the method-returns-in-exception-handlers issue, I just pushed
> update #3923 that allows them again, and just logs a note to the
> Transcript. I did this instead of taking back all the changes because
> they are not trivial, and they will be useful for trying different
> approaches.
>
> 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
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20191015/324032f7/attachment-0001.htm>


More information about the Cuis-dev mailing list