[squeak-dev] The Inbox: System-dtl.1170.mcz

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Mon Sep 14 11:36:21 UTC 2020


Hi all,


I just took a short look at all references to the #World binding in my main image, and there are several packages that would probably break if we completely dropped this binding: Animations<https://github.com/hpi-swa/animations/>, MagicMouse<https://github.com/cmfcmf/MagicMouse/>, Morphic Testing Framework<https://github.com/hpi-swa-teaching/Morphic-Testing-Framework>, RefactoringTools, Pheno<https://github.com/tom95/Pheno>, SwaLint<https://github.com/hpi-swa-teaching/SwaLint>, Signals<https://github.com/hpi-swa/signals>, Widgets<https://github.com/hpi-swa/widgets>, WindowAcrobatics<https://github.com/hpi-swa-teaching/WindowAcrobatics>. And this enumeration does neither yet include my own projects nor all other valuable packages I do not know yet. Even the trunk itself still somehow depends on #World, see HandMorph >> #objectForDataStream: or DiskProxy >> #comeFullyUpOnReload:.


I would really wish we could find a solution to raise a DeprecationWarning if the binding is still accessed but still provide a fallback for it. Compiler support sounds interesting as well, but we should notice that existing images should still keep working without reinstalling/patching any package. Hypothetically, we could change the Compiler (*not* the Parser) to compile a deprecated literal binding from an extra list differently, so that the source code still will look the same, but the binding will actually point to a method call. Or would such a source code/bytecode discrepancy be too confusing for other components such as the decompiler?


Please note that this problem is not only applicable to the World global. Whenever we decide to deprecate a class, we could benefit from a solution that raises a DeprecationWarning when an attempt is made to access it as well.


Best,

Christoph

<http://www.hpi.de/>
________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von K K Subbu <kksubbu.ml at gmail.com>
Gesendet: Sonntag, 13. September 2020 13:38:10
An: squeak-dev at lists.squeakfoundation.org
Betreff: Re: [squeak-dev] The Inbox: System-dtl.1170.mcz

On 12/09/20 6:52 pm, commits at source.squeak.org wrote:
> End of the #World as we know it. Package postscript only. About two
> years ago we eliminated all dependencies on global World. However,
> the global binding has remained functional on the theory that some
> external packages might still expect it.
When an undefined global var is encountered, is it possible to detect it
as an obsolete reference and then offer an option to replace it with a
proper object accessor? Perhaps a 'Obsolete Globals' dictionary mapping
an obsolete global symbol to an object access?

Currently, we just throw up a 'Undefined Variable' dialog offering
closest symbols to correct a possible misspelling.

Regards .. Subbu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200914/aaff0da1/attachment.html>


More information about the Squeak-dev mailing list