ipm
ipm copied to clipboard
Compile classes with u flag
When running install -v moduleName
I see
Compilation started on 5/13/2024 12:23:34 with qualifiers "d-lck"
but I'm seeing issues with the class Ens.Utils.Tasks.Purge being compiled when I deliver rclib-ens and this is causing the entire module from not being installed successfully as ENSLIB is marked as ReadOnly
If I do ##class(%SYSTEM.OBJ).IsUpToDate("Ens.Utils.Tasks.Purge")
it reports 0.
All of this being said I would like to see ZPM call the class compiler with the u(skip up to date) flag, to skip any up to date classes.
Consider I have a module with 100 classes on version 1.0.1
and then I make a change to one of the 100 classes and do not change the version.
This will redeliver all 100 classes and compile all 100 classes but in practice we only need to compile one class.
@SCanzano I view this as an upstream issue in that ##class(%SYSTEM.OBJ).IsUpToDate("Ens.Utils.Tasks.Purge") definitely should report 1 (and IPM can't do anything about that). This could be worth pursuing via InterSystems Support.
As a workaround, two options:
- Use the Flags attribute on the resource in question to add the
uflag - e.g.:<Resource Name="WhateverPackage.PKG" Flags="cku" /> - Use $System.OBJ.SetFlags/SetQualifiers to skip up-to-date by default (https://docs.intersystems.com/iris20241/csp/docbook/Doc.View.cls?KEY=RCOS_vsystem_flags_qualifiers#RCOS_vsystem_flags_qualifiers_defaults)
Disclaimer: I haven't used the Flags attribute for ~7 years, but I think it should work!
@isc-tleavitt I dont disagree with you and this may not have solved my issue but the real question is when running install moduleName should it force the recompile of classes which have not changed. Using the u flag would allow it to skip the up to date classes and produce a much faster install time for modules that have a large number of classes and the latest version of the module has only changed a few of the classes in the module,
@isc-tleavitt
@SCanzano I view this as an upstream issue in that
##class(%SYSTEM.OBJ).IsUpToDate("Ens.Utils.Tasks.Purge")definitely should report 1 (and IPM can't do anything about that). This could be worth pursuing via InterSystems Support.As a workaround, two options:
- Use the Flags attribute on the resource in question to add the
uflag - e.g.:<Resource Name="WhateverPackage.PKG" Flags="cku" />- Use $System.OBJ.SetFlags/SetQualifiers to skip up-to-date by default (https://docs.intersystems.com/iris20241/csp/docbook/Doc.View.cls?KEY=RCOS_vsystem_flags_qualifiers#RCOS_vsystem_flags_qualifiers_defaults)
My issue with this is I was unaware of an attribute on Flags for Resource . I don't see this documented anywhere. Is Resource documented anywhere and is Flags also documented?
@isc-tleavitt I dont disagree with you and this may not have solved my issue but the real question is when running install moduleName should it force the recompile of classes which have not changed. Using the u flag would allow it to skip the up to date classes and produce a much faster install time for modules that have a large number of classes and the latest version of the module has only changed a few of the classes in the module,
That's a fair question. @isc-kiyer @isc-bzhang do you have any thoughts on this? I think changing the default flags (or making the default compilation flags an IPM setting like default registry, analytics, etc.) in this way would be reasonable.
@isc-tleavitt
@SCanzano I view this as an upstream issue in that
##class(%SYSTEM.OBJ).IsUpToDate("Ens.Utils.Tasks.Purge")definitely should report 1 (and IPM can't do anything about that). This could be worth pursuing via InterSystems Support. As a workaround, two options:
- Use the Flags attribute on the resource in question to add the
uflag - e.g.:<Resource Name="WhateverPackage.PKG" Flags="cku" />- Use $System.OBJ.SetFlags/SetQualifiers to skip up-to-date by default (https://docs.intersystems.com/iris20241/csp/docbook/Doc.View.cls?KEY=RCOS_vsystem_flags_qualifiers#RCOS_vsystem_flags_qualifiers_defaults)
My issue with this is I was unaware of an attribute on Flags for Resource . I don't see this documented anywhere. Is Resource documented anywhere and is Flags also documented?
The resource element in module.xml is documented (insufficiently, without any information on attributes - Flags isn't the only useful one) at https://github.com/intersystems/ipm/wiki/03.-IPM-Manifest-(Module.xml)#elements . I've added the documentation tag to reflect the need for expansion there.
@isc-tleavitt Purely from the use case scenario described, skipping up-to-date classes sounds reasonable... I'm a bit concerned with whether it would break any usage for non-compile lifecycle or something else...
Added documentation here: https://github.com/intersystems/ipm/wiki/03.-IPM-Manifest-(Module.xml)#resource