[squeak-dev] Installing metacello within a 'Smalltalk run:[]' fails
Levente Uzonyi
leves at caesar.elte.hu
Thu Jul 16 02:09:40 UTC 2020
On Wed, 15 Jul 2020, tim Rowledge wrote:
> Running
> Installer ensureRecentMetacello
> works. (in a 5.3-19435 image)
>
> Wrapping it in
> Smalltalk run:[Installer ensureRecentMetacello ]
> crashes. Specifically in MetacelloScriptEngine>>#lookupProjectSpecFor: we find that 'registration' is nil on the last line.
>
> Seems a bit odd; possibly sometihng to do with the assorted exception handling in the SmalltalkImage>run: code?
I think the cause of the problem is that SmalltalkImage >> #run:
catches all Notifications, logs them, and finally #resumes them.
But many Notifications override #defaultAction, and the return value of
that method will be the value the Notification normally returns with when
not handled.
#resume does not send #defaultAction (it sends #defaultResumeValue,
which is rarely used).
IMO the code should not #resume the Notifications just #pass them, so that
they can return with whatever they want (or be handled by an outer
handler).
Levente
>
> I'm trying to make a simplecommandline filein that will load a bunch'o'stuff, something that has been doable before, so this is a bit puzzling.
>
> {a bit later}
> Hmm, moving the Installer ensureRecentMetacello outside the run: block lets it install but later use of metacello within the run: block to load Seaside fails because MetacelloIgnorePackageLoaded signal: pkg doesn't return a boolean. So, yeah, probably sometihng to do with the run: handling of exceptions.
>
> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> "How many tnuctip does it take to change a lightbulb?”
> "Depends what you want them to change it into."
More information about the Squeak-dev
mailing list
|