Comment 1 for bug 1705661

Revision history for this message
Benoît St-Jean (bstjean) wrote :

I ran a simple script to detect how much cruft (classes with no references in Dr. Geo 17-07a) is left into the image. (see script attached)

There are still lots of test classes (subclasses of TestCase), all the rules for the Code Critics, lots of unneeded stuff (for instance, Pharo still has 2 compiler classes, duplicate functionalities with Stream vs Zinc classes), etc. I have never been convinced that the "minimal image" approach is the way to go as it will most likely create a Monticello package nightmare to solve dependencies.

I was thinking of creating a tool to use the stripping approach (e.g. Dolphin Smalltalk Lagoon Wizard, VisualWorks Image Stripper, VisualAge packager, etc), i.e. removing code without any references with a mechanism to provide the packager with directives/exceptions (à la VisualAge).

First step would be to remove classes with no references. Second step would be to remove unsent methods. Third step could be symbol reduction (strip Pool dictionaries of unreferenced symbols), fifth could be to remove unreferenced instances in class and class instance variables. Of course, the tool would also provide a way to disable programmer functionalities of your choice.

I was planning on creating a simple class with no UI so you could execute the code in a Workspace/Transcript or from the command line. All the tool output could be saved in files and/or displayed on the Transcript.

Of course, the first step would be to make the Pharo image (5.1 and up or whatever you plan to use) become "packager friendly" by supplying it with #packagerIncludeClassNames, #packagerIncludeKnownSelectors and the like.

What do you think Hilaire?