When releasing the latest version of the Glamorous Toolkit we noticed a little problem: while in Pharo 4.0 the code worked just fine, in Pharo 3.0 we got a problem due to a reference to a class that exists only in Pharo 4.0. The problem came from the GlamourCore project, but I could not exactly see where the problem lies given that the dependencies are deeply nested.
Thus, to fix the problem I first needed a map. I inspected the object corresponding to the configuration version:
ConfigurationOfGToolkit new project version: #stable
and I started to work on a small visualization showing the dependency graph. After a couple of minutes, I ended up with a reasonable view:
The problem was that GlamourCore appeared twice: once with the 3.0.6 version and once with the 3.0.7 version. After a brief inspection, it became clear that 3.0.7 is the correct version. All that was left to do was to update the corresponding configuration dependencies.
Once the visualization code was ready, I installed it in the class of the configuration version as an inspector extension method (through the
gtInspectorProjectMapIn: composite <gtInspectorPresentationOrder: 40> composite roassal2 title: 'Project map'; initializeView: [ RTMondrian new ]; painting: [ :view | view shape label text: [:each | each asString copyReplaceAll: 'ConfigurationOf' with: '']. view nodes: self allProjects. view edges connectToAll: [:each | each projects collect: #version]; moveBehind. view layout horizontalDominanceTree ]
To install the method, I did not have to leave my object but wrote the code right in the inspector.
After installing the new method, the inspector automatically updated itself and the visualization was ready to be used.
Equipped with the map, we could fix the configurations and use the visualization again to test that everything is fine:
The whole scenario was measured in minutes. In fact it took more time to write this post than to do the job.