Has a class been compiled?
Is there an easy way to see if a class object has been compiled or needs to be? Or to get a list of classes that need to be compile in a particular namespace?
Product version: IRIS 2020.1
Is there an easy way to see if a class object has been compiled or needs to be? Or to get a list of classes that need to be compile in a particular namespace?
In SMP / Explorer you can get.png)
class by name and its last date
under routines
the object by related name
- - - -- - - -
In addition in Studio, a class that is saved but not compiled.png)
is marked with + after the name
while a changed class that is neither saved nor compiled.png)
is marked by *
I have no idea if VSCode or Atelier have similar features.
If you want to know if a compiled class exists, call:
write $$$comClassDefined(class)
It, however, does not answer the question of a compiled version being current.
$system.OBJ.IsUpToDate()might fit the bill for your first question.
should work for your 2nd question (documentation here: https://docs.intersystems.com/irislatest/csp/documatic/%25CSP.Documatic....)
using SQL you can compare the last change between definition and compilation of classes
a negative difference shows where recompilation is required.
I used Posix-Timeformat for an easier compare
SELECT def.ID, cmp.TimeChanged compiled, def.TimeChanged defined, to_char($piece(cmp.TimeChanged,',',1),'J')-to_char($piece(def.TimeChanged,',',1),'J') diff FROM %Dictionary.ClassDefinition def left outer join %Dictionary.CompiledClass cmp on def.ID=cmp.ID where NOT def.name %startswith '%' order by 4