[squeak-dev] how to protocol removal
rabbit
rabbit at churchofthesacrifice.org
Mon Oct 5 20:03:09 UTC 2020
Hi Jakob,
Thanks for the info! How could I define such a preamble in Monticello? I
ended up redefining the methods to call the super impl and pass the
tests. So these methods are present in the package I published.
I modified the PromiseTest in KernelTests-Processes to add small delay
to allow for async completions. The only changes in semantics are that
when a second attempt for a resolution, of a previously resolved
promise, I throw a PromiseAlreadyResolved exception. When an arbitrary
rejection value is used I wrap it in a BrokenPromiseValue excption.
These are the only two classes & exceptions I added to the trunk impl.
PromisesLocal pass those tests when it is loaded.
K, r
On 10/5/20 3:29 PM, Jakob Reschke wrote:
> Hi,
>
> What about a preamble script to remove the existing class or methods?
>
> Though it does not sound like a good idea to me if the interface is
> not compatible. It will probably break other stuff in the image.
>
> Kind regards,
> Jakob
>
> Am So., 4. Okt. 2020 um 19:41 Uhr schrieb rabbit
> <rabbit at churchofthesacrifice.org>:
>> I have a package PromisesLocal which redefines a trunk class, Promise.
>> There is some old protocol from trunk Promise which remains as part of
>> the new definition and this is breaking tests (,
>> Promise>>#whenResolved:, Promise>>#whenBroken:). Is there a way with
>> Monticello or loading where I can remove this protocol? Or a better
>> question is how to best remove this protocol when loading a Monticello
>> package?
>>
>> K, r
>>
>>
>>
More information about the Squeak-dev
mailing list
|