[squeak-dev] The Inbox: Tests-ct.466.mcz

christoph.thiede at student.hpi.uni-potsdam.de christoph.thiede at student.hpi.uni-potsdam.de
Fri Oct 22 15:11:33 UTC 2021


Hi Levente,

> > Provides regression tests for an issue with background styling in Shout that is fixed in ShoutCore-ct.86.
> 
> Is there a way for a human to trigger that issue without 
> explicitly mangling the deferred UI messages?

I'm not aware of any real failure inside the Trunk that results from this bug. PluggableTextMorphPlus >> #stylerStyledInBackground: is pretty robust in this regard. You could try to remove the check from that method and block your VM for a moment while typing a character into a method (background styling) and resetting it via cmd + l (synchronous styling) so that both user events will be processed right after each other before the deferred message can be evaluated. However, I did not try this myself. I stumbled about this bug while looking at a defect in another project that uses a Shout styler and first sends #hasUnacceptedEdits: to a pluggable text morph and then #accept [1].

> Shout's tests live in a separate package: ShoutTests. Is there a reason to 
> add the these tests to the Tests package instead?

This reason is called human error. :-) Will upload ShoutTests-ct.35 right now!

> > +        [Project current lastDeferredUIMessage]
> > +                whileNotNil: [Project current world runStepMethods].!
> 
> Instead of introducing senders of never-used methods into the Trunk, 
> I suggest deprecating them and use "common" Smalltalk instead:
> 
>     [Project current lastDeferredUIMessage isNil]
>         whileFalse: [Project current world runStepMethods]

In my image, #whileNil has one sender and #whileNotNil: has three. They feel actually pretty comvenient, but I also see your point of intermixing different domains, yes ...

Best,
Christoph

[1] https://github.com/hpi-swa-lab/babylonian-programming-smalltalk/blob/7a198b0e0592a7e87e6f70837d00692be6c12b6b/packages/Babylonian-UI.package/CodeHolder.extension/instance/addAnnotation.in..st#L24-L27

---
Sent from Squeak Inbox Talk

On 2021-10-22T16:44:54+02:00, leves at caesar.elte.hu wrote:

> Hi Christoph,
> 
> On Fri, 22 Oct 2021, Thiede, Christoph wrote:
> 
> > ==================== Summary ====================
> > 
> > Name: Tests-ct.466
> > Author: ct
> > Time: 22 October 2021, 3:28:55.369526 pm
> > UUID: 359b8eb8-e155-4448-8039-42ef17ccb09d
> > Ancestors: Tests-eem.464
> > 
> > Provides regression tests for an issue with background styling in Shout that is fixed in ShoutCore-ct.86.
> 
> Is there a way for a human to trigger that issue without 
> explicitly mangling the deferred UI messages?
> 
> > + SystemOrganization addCategory: #'Tests-ShoutCore-Styling'!
> 
> Shout's tests live in a separate package: ShoutTests. Is there a reason to 
> add the these tests to the Tests package instead?
> 
> > Item was added:
> > + ----- Method: ShoutBackgroundStylingTest>>runDeferredUIMessages (in category 'support') -----
> > + runDeferredUIMessages
> > +
> > +        self assert: Smalltalk isMorphic.
> > +       
> > +        [Project current lastDeferredUIMessage]
> > +                whileNotNil: [Project current world runStepMethods].!
> 
> Instead of introducing senders of never-used methods into the Trunk, 
> I suggest deprecating them and use "common" Smalltalk instead:
> 
>     [Project current lastDeferredUIMessage isNil]
>         whileFalse: [Project current world runStepMethods]
> 
> > Item was added:
> > + ----- Method: ShoutBackgroundStylingTest>>waitForDeferredUIMessages (in category 'support') -----
> > + waitForDeferredUIMessages
> > +
> > +        [Project current lastDeferredUIMessage]
> > +                whileNil: [10 milliSeconds wait].!
> 
> Same as above.
> 
> 
> Levente
> 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20211022/fd7ee618/attachment.html>


More information about the Squeak-dev mailing list