[Glass] recompiling a package

Dale Henrichs via Glass glass at lists.gemtalksystems.com
Wed Feb 18 11:20:37 PST 2015


Paul,

Here's a tODE shell script (`touch sh repairClasses`) that takes a list 
of classes and should do the moral equivalent of "add a space to iv list":

[ :topez :objIn :tokens :command :commandNode |
   | opts args |
   "for help: ./repairClasses -h"
   command
     getOptsMixedLongShort:
       {#('help' $h #'none').
       #('classes' nil #'required')}
     optionsAndArguments: [ :options :operands |
       opts := options.
       args := operands ].
   opts
     at: 'help'
     ifAbsent: [
       opts
         at: 'classes'
         ifPresent: [ :classNameList |
           | classes |
           classes := Set new.
           (classNameList findTokens: '')
             do: [ :className | (Smalltalk at: className) ifNotNil: [ 
:cl | classes add: cl ] ].
           GsDeployer
             deploy: [ classes do: [ :cls | cls asClassDefinition 
createClass ] ] ] ]
     ifPresent: [ :ignored |
       TDManPage
         viewManPage:
           'NAME
   repairClasses - repairClasses sript utility template
SYNOPSIS
   repairClasses [-h|--help]
                 --classes=`<class-name-list>`
DESCRIPTION
EXAMPLES
   ./repairClasses -h
   ./repairClasses --classes=`TDClassDefinitionClient TDMcClassDefinition`
'
         topez: topez ] ]

Just run the following with your list of class names:

   ./repairClasses --classes=`TDClassDefinitionClient TDMcClassDefinition`

This happened because GLASS/GsDevKit didn't create the classes correctly 
in the first place ... presumably there were some errors during the 
load? I'd like to find out if possible.

Dale

On 2/18/15 10:15 AM, Paul DeBruicker via Glass wrote:
> Hi -
>
>
> I've loaded a Monticello package into GemStone 3.1.0.6 using tODE and the class hierarchy is broken.  Some subclasses of some classes don't know that they're subclasses and so method lookup is broken for those subclasses.  If I put a space in the #instVarNames: portion of the class definition and save it the class hierarchy is restored.
>
>
> Is there a way to do that for all classes in the package from a script?
>
>
> thanks
>
> Paul
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass



More information about the Glass mailing list