[squeak-dev] Roassal next steps.

gettimothy gettimothy at zoho.com
Mon Oct 12 18:50:27 UTC 2020


Hi Tom , Jakob



Concerning Announcements: when I initially tried to load Roassal, I included AXAnnouncements from Squeaksource. However, there are some extension methods from Roassal on Announcements that assume a different data layout. In the version on Github I just made sure the extensions compiled at all. Looking at the failing tests now, here are the two hopefully correct implementations for the extension methods (code is mostly copied from the Pharo version, you may want to consider having these make better use of our stdlib if we want to keep those :)):



SubscriptionRegistry>>getInteractionsForClass: eventClass

"Return the list of subscription for a given Event class"

| answer |

answer := OrderedCollection new.

subscriptionsByAnnouncementClasses values do: [ :collection | 

collection do: [:subscription |

(subscription action receiver class includesBehavior: eventClass) ifTrue: [answer add: subscription subscriber]]].

^ answer




SubscriptionRegistry>>handleSubscriberClass: eventClass

"Return true if the receiver has a callback subscripbed for the event class"

^ subscriptionsByAnnouncementClasses values anySatisfy: [ :subCollection | 

subCollection anySatisfy: [:subscriber | subscriber action receiver class includesBehavior: eventClass ]]




With these two, the two RSRoassal3Test methods pass for me.












I will use yours as I have no idea how to "make better use of our stlib"  (:

I did some quick checking and found, as you did, that Pharo has rolled their own: https://github.com/pharo-project/pharo-core/tree/6.0/Announcements-Core.package








Is AXAnnouncements still API-compatible with the Pharo Announcements (or

should I phrase this the other way around)? Either way, it would be nice to

have a working Pharo-Announcements-API implementation for Squeak, at least

for compatibility's sake. It doesn't have to be in the Trunk, but once you

have an implementation or shim, one would extend the BaselineOfRoassal to

include this dependency for Squeak only.










I remember reading years ago that Announcements and AXAnnouncements where API compatible, I have no idea on Pharo.


So, to compare the API, just make sure each implements the messages and returns the same stuff? Check that tests implemented in AXA work in Pharo and tests in Pharo Announcments work in AXA Squeak?





I think the most helpful next step would be to go through each package, make sure the package can be loaded without stumbling over stray pharo-only symbols and getting all the tests to pass.




I will do that this weekend! 



cheers,



t
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20201012/84c141e3/attachment-0001.html>


More information about the Squeak-dev mailing list