Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TextMorphForEditView >> keyStroke: silently shadows a Trunk method #395

Open
LinqLover opened this issue May 7, 2021 · 0 comments
Open
Labels
bug Wrong behaviour that needs to be fixed

Comments

@LinqLover
Copy link

This extension method shadows a method in the Trunk:

https://github.com/hpi-swa-teaching/IMAPClient/blob/5437c6e6c9194ec38035562a12a9ae8d4b075764/packages/IMAPClient-UI.package/TextMorphForEditView.extension/instance/keyStroke..st

This is usually a bad practice for several reasons, including but not limited to:

  • If the method gets updated in a further Squeak update, your patch is automatically removed again
  • Possible merge conflicts can occur when updating your image
  • If IMAPClient is installed into a newer Squeak image, all newer changes made to this method in Squeak will be reverted and replaced by the shadow version
  • If the extension method is removed again (via an update of IMAPClient or because the user unloads it), the method will be removed permanently, most probably making your image unusable

For the last point, there is a technique called override extension method: By renaming the category of the extension method (*IMAPClient-UI) into any name that ends with -override, the method is officially marked as an override method. When the method is removed again at a later point via the extensor, Squeak will not remove it completely but instead restore the original trunk method.

Apart from that, it would be great if this extension method could be eliminated completely. Since Squeak 5.3, the related bug has also been fixed in the Trunk, so as soon as you decide to drop support for Squeak 5.2, the method could be removed completely.

@LinqLover LinqLover added the bug Wrong behaviour that needs to be fixed label May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Wrong behaviour that needs to be fixed
Projects
None yet
Development

No branches or pull requests

1 participant