When a Pharo package that is counted for code coverage extends a class that is not in the package, all methods inside that class are wrapped with the SCICoverageWrapper anyway. If this occurs with a method on UndefinedObject, the entire Pharo image becomes unresponsive.
When a Pharo package that is counted for code coverage extends a class that is not in the package, all methods inside that class are wrapped with the
SCICoverageWrapper
anyway. If this occurs with a method onUndefinedObject
, the entire Pharo image becomes unresponsive.For example: Grease extends the class
UndefinedObject
. Because of this, SmalltalkCI is wrapping all methods inUndefinedObject
. The Pharo image becomes unresponsive when executing the following line: https://github.com/hpi-swa/smalltalkCI/blob/44a709d5d133b7e02bbc11a50aba263abb2a813c/repository/SmalltalkCI-Coverage-Core.package/SCICodeCoverage.class/instance/startUp.st#L8z . More specifically, it becomes unresponsive when class methods fromUndefinedObject
are wrapped.This happens even when specifying the classes to be checked for coverage using
#categories:
rather than#packages:
.The origin seems to be that the code in
SmalltalkCIPharo>>classesInPackage:
returns all classes in the package rather than only the classes defined in the package: https://github.com/hpi-swa/smalltalkCI/blob/44a709d5d133b7e02bbc11a50aba263abb2a813c/repository/SmalltalkCI-Pharo-Core.package/SmalltalkCIPharo.class/class/classesInPackage..st#L3When I replace the send of
classes
with the send ofdefinedClasses
in the method above, the problem goes away.Mind that the extension methods are still wrapped, as they should, because of the implementation in https://github.com/hpi-swa/smalltalkCI/blob/master/repository/SmalltalkCI-Coverage-Core.package/SCICodeCoverage.class/instance/allMethodReferencesToCover.st