[squeak-dev] The Trunk: Kernel-eem.1067.mcz
Bert Freudenberg
bert at freudenbergs.de
Mon Mar 27 14:15:49 UTC 2017
On Sat, Mar 25, 2017 at 3:30 AM, Eliot Miranda <eliot.miranda at gmail.com>
wrote:
> Hi Bert,
>
> I don't like having complex package scripts, at least not unless senders
> works with them. So I consciously chose to use the method. One of the
> things that's a little weak with package scripts is knowing how long they
> should stay there. The style that I used in my method
> - check if the transformation has been applied and if so exit.
> - apply the transformation
> - check that the transformation succeeded
> allows for the preamble script to invoke the method as many times as the
> package is loaded until the preamble script is modified
>
Except it will not be invoked again if the package load itself succeeded,
until it is modified. We don't have a special mechanism for that, but I
guess the script could raise an exception which would abort the loading.
This might be okayish in a preamble script since the rest of the package
has not been added to the system yet.
It would be nice to have some ability to look at versions of package
> scripts and match the changes against package versions. I'm not sure I see
> a way of determining easily
> - if a particular version of a package script was actually applied to an
> image
> - when a particular version of a package script was actually applied to an
> image
>
I guess one could play around with concrete PackageInfo subclasses, but
yes, we don't have support for that currently.
> The same criticism can be levelled at class initialisers, but their being
> more accessible to the standard tools makes exploring the questions easier
> IMO.
>
I generally prefer class initializers too, but they're executed after the
package loaded, not as a preamble.
- Bert -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20170327/2c6baa82/attachment.html>
More information about the Squeak-dev
mailing list
|