Exploring extension methods to the base image
Glamorous Toolkit adds several extensions to the base Pharo image. This page shows a quick overview of those extension methods.
It also provides an analysis to detect which of those extension methods replace or override methods in the base Pharo image.
Extension methods to the base image
GtExtensionMethodsProjectBuilder
computes extension methods added from any project loaded by Glamorous Toolkit to classes from the base Pharo image.
There are 2876
extension methods from 165
packages in 69
repositories.
Out of these 92
extension methods from 29
packages in 21
repositories are annotated with gtPharoPatch:
We can browse them by the repository that defines them.
We can also browse them by the package that defines them.
This information can also be extracted using the code snippet below:
GtExtensionMethodsProjectBuilder forGToolkit.
The above views are using a cache in GtExtensionMethodsGToolkitMetrics
. To update the computed values we should reset the cache using the snippet below.
GtExtensionMethodsGToolkitMetrics cleanUp.
Extension methods replacing/overriding methods or missing classes
Extension methods can replace methods from the base image, or can be added to subclasses overriding existing methods. Also in another base image, the class that is extended ca be missing.
The class GtExtensionMethodsBaseImageOverridesReportBuilder
performs an analysis that extracts these extension methods. This analysis :
- downloads the base Pharo image used to create this image (or a given one)
- extracts the list of extensions methods added to the base Pharo image (the one shows above)
- runs a script in the base image that detects replaced or override methods.
GtExtensionMethodsBaseImageOverridesReportBuilder forGToolkit
We can also run this analysis on top of other base images.
builder := GtExtensionMethodsBaseImageOverridesReportBuilder new. builder imageName: 'Pharo11-SNAPSHOT-64bit-53659ed.image'; imageArchiveName: 'Pharo11-SNAPSHOT.build.700.sha.53659ed.arch.64bit.zip'; imageUrl: 'https://files.pharo.org/image/110/Pharo11-SNAPSHOT.build.700.sha.53659ed.arch.64bit.zip'. wrapper := builder buildReportForGToolkit