[squeak-dev] Review Request: packageSelfExtensions.1.cs

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Fri Mar 25 21:41:49 UTC 2022


Thanks for the review, Vanessa!


Yeah, this example is very likely not a proper application of extension categories. I think this might be the cause of some package reorganizations of Etoys/Squeakland in the past.


On the other hand, I have some projects where I plan to split up two different system categories (something like Core + UI) in different categories later, but until then, I already use extension methods as a preparation for the later package split up. So it's a temporary solution only.


Best,

Christoph

________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Vanessa Freudenberg <vanessa at codefrau.net>
Gesendet: Freitag, 25. März 2022 18:41:28
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] Review Request: packageSelfExtensions.1.cs

On Fri, Mar 25, 2022 at 8:06 AM <christoph.thiede at student.hpi.uni-potsdam.de<mailto:christoph.thiede at student.hpi.uni-potsdam.de>> wrote:
=============== Summary ===============

Change Set:        packageSelfExtensions
Date:            25 March 2022
Author:            Christoph Thiede

Revises the notion of extension method so that also extensions to the same package are found. For instance, browsing all extensions of the package 'Etoys' local to the category 'Etoys-Squeakland-MorphicExtras-Charts' will now also bring up the extensions on Player.

Fixes #extensionCategoriesForClass:localTo: to also find different casings of the package name in the extension category. Also revises #methodCategoryPrefix to no longer destroy the original casing of the package name.

Note that with this change, #extensionMethods and #coreMethods are no longer necessarily disjunct.

If a method is in an extension category of its own package, that's a categorization bug. Rather than muddling the definition of extension methods vs core methods I'd rather we fix the categorization of miscategorized methods.

In the particular case of your example the method category should probably be simply "charts", or possibly "morphicextras-charts".

If your goal is to browse all methods in a certain category (or category prefix) across the whole image then that should probably be a method in SystemNavigation, not PackageInfo. PackageInfo defines a package (its name is somewhat misleading, could also be PackageSpec).

Your fixes look fine though.

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


More information about the Squeak-dev mailing list