[Pharo-project] RPackage registration mess
so once again rpackage is registered to the wrong announcer... I figured out that update 20200 first introduced this bug by wrongly resetting RPackage: http://code.google.com/p/pharo/issues/detail?id=6326 It registered RPackageOrganizer to MCWorkingCopy announcer but SystemAnnouncer announcer == MCWorkingCopy announcer and by default RPackageOrganizer registers to SystemAnnouncer privateAnnouncer. obviously we got a double registration of RPackageOrganizer after this. Which can be easily fixed by doing: RPackageOrganizer registerInterestToSystemAnnouncement. The invariant that should hold is self assert: SystemAnnouncer announcer hasSubscriber: RPackageOrganizer default = false. self assert: SystemAnnouncer privateAnnouncer hasSubscriber: RPackageOrganizer default. however I still can't figure out where the damn bug got introduced again...
On Thu, Jul 26, 2012 at 1:17 PM, Camillo Bruni <camillobruni@gmail.com> wrote:
self assert: SystemAnnouncer announcer hasSubscriber: RPackageOrganizer default = false.
this expression is probably incorrect as #= is sent to (RPackageOrganizer default) -- Damien Cassou http://damiencassou.seasidehosting.st "Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
My bad :/. BTW, we have to introduce one method to restore the system subscriptions to a good state whatever was the state before. And that way we do not mess it so easily again. On Thu, Jul 26, 2012 at 1:17 PM, Camillo Bruni <camillobruni@gmail.com>wrote:
so once again rpackage is registered to the wrong announcer...
I figured out that update 20200 first introduced this bug by wrongly resetting RPackage:
http://code.google.com/p/pharo/issues/detail?id=6326
It registered RPackageOrganizer to MCWorkingCopy announcer but
SystemAnnouncer announcer == MCWorkingCopy announcer
and by default RPackageOrganizer registers to SystemAnnouncer privateAnnouncer.
obviously we got a double registration of RPackageOrganizer after this. Which can be easily fixed by doing:
RPackageOrganizer registerInterestToSystemAnnouncement.
The invariant that should hold is
self assert: SystemAnnouncer announcer hasSubscriber: RPackageOrganizer default = false. self assert: SystemAnnouncer privateAnnouncer hasSubscriber: RPackageOrganizer default.
however I still can't figure out where the damn bug got introduced again...
until a few updates ago, the RPackage tests were not restoring the SystemAnnouncer correctly on tearDown. Probably it was in there...
On 2012-07-26, at 13:24, Guillermo Polito wrote:
My bad :/.
BTW, we have to introduce one method to restore the system subscriptions to a good state whatever was the state before. And that way we do not mess it so easily again.
but the strange part is, that this cannot be caused by tests... I saw that some tests did it wrong. still strange that it popped up again :/
participants (4)
-
Camillo Bruni -
Damien Cassou -
Guillermo Polito -
Stéphane Ducasse