Sylvain Guilbaud · Apr 20 4m read

Method to recompile classes and routines after a major upgrade

During a major version upgrade it is advisable to recompile the classes and routines of all your namespaces (see Major Version Post-Installation Tasks).

do $system.OBJ.CompileAllNamespaces("u")
do ##Class(%Routine).CompileAllNamespaces()

To automate this administration task and keep a log of any errors, below is an example of a class to import and compile into the USER namespace that you can use after each upgrade : admin.utils.cls

 Class admin.utils.cls

After upgrading, just run the admin.utils.upgrade method from an IRIS Terminal session :

USER>do ##class(admin.utils).upgrade()

And see the result from the administration portal via the explorer System > Globals > upgradeLog

1 560
Discussion (3)1
Log in or sign up to continue

I'm using this also after a minor update. It is better to have it like:

do $system.OBJ.CompileAllNamespaces("cru")

So it will do a recursive compile