Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to uninstall Pharo Glamorous Toolkit?

I want to uninstall the Glamorous Toolkit (to me seems to be overloaded versions of classic Smalltalk tools) in Pharo 4 or 5.

Here is my code:

| config configName |
configName := #ConfigurationOfGTInspectorCore.
config := (MBConfigurationInfo 
            configurationClass: (Smalltalk globals at: (configName asSymbol)))
            configurationRoot: MBConfigurationRoot new;
            yourself.
config workingCopy unload

but my script unloads the Configuration, but not the packages or classes and methods it contains, and I want to unload all GT packages in the Configuration.

What am I doing wrong? Any assistance will be greatly appreciated!

Thank you in advance.

like image 485
Juanjo Avatar asked Jan 14 '16 04:01

Juanjo


2 Answers

I also prefer GT to be optional, the fact the Pharo board is going to impose GT by default in upcoming Pharos makes me think about the transparency process, and how far is a Pharo fork if such policies continues.

That said, GT tools cannot be easily uninstalled (and it takes a lot of time):

Workspace openContents: 'GTPlayground setGTPlaygroundEnabledStatus: false.
" ========== Debuggers ========== "

Nautilus pluginClasses: nil.
SpecDebugger closeAllDebuggers.
GTGenericStackDebugger closeAllDebuggers.
GTGenericStackDebugger setGTDebuggerEnabledStatus: false.

" ========== Miscellany ========== "

GTInspector setGTInspectorEnabledStatus: false.
GTExampleOrganizer stop.
GTEventRecorder cleanUp.
GTEventRecorderSettings cleanUp.
GTSnippets reset.
GTPlayBook reset.
GTPlayBook resetDirectories.
GTSpotter cleanUp.
GTSpotterGlobalShortcut reset.

GlobalIdentifier cleanUp.
Privacy cleanUp.

" ========== QA ========== "
QASettings inspectorPluggin: false.
QASettings spotterPlugin: false.
QAEventCollector unload.
(MCPackage named: ''QualityAssistant'') unload.

" ========== RPackage ========== "
RPackageOrganizer default packageNames
    select: [ :each | each beginsWith: ''GT'' ]
    thenDo: [ :each |
        (MCPackage named: each) unload.
        RPackageOrganizer default unregisterPackageNamed: each.
        " Possibly unnecessary... "
        Smalltalk removeEmptyMessageCategories.
        Smalltalk cleanOutUndeclared.
        Smalltalk fixObsoleteReferences.
        Smalltalk globals flushClassNameCache ].  
Behavior flushEvents.
Behavior flushObsoleteSubclasses.
SmalltalkImage current resetTools.'
like image 126
Hernán Avatar answered Nov 05 '22 09:11

Hernán


If you want to use older versions, all you have to do is to go to settings and deactivate them (go to settings in the menu: world menu/system/settings), then look for "Glamorous Toolkit".

Unloading packages is a lot more complicated: You need to iterate each package in correct order and unload it.

Now, notice that GT tools are the official tools (Overloaded for you, powerful for us)... Most probably future versions of Pharo will not contain the older tools.

I suggest you to give them a try... you will see the benefits very fast.

like image 5
EstebanLM Avatar answered Nov 05 '22 09:11

EstebanLM