$preprocess failure
There is an undocumented command, $preprocess, that can be called as below. In this case it takes the class name and converts its code into a text array. That includes comments as well. Two questions about it if you know:
- Is that the only job that $preprocess does?
- Why would it generally work for most classes except for a single class? This is probably a bug since it works in a later Cache option for this class too but I need to work with this Cache version as well. This class does not contain any control characters except for plain vanilla tabs, checked.
Comments
I would not recommend using such undocumented functions like this. Instead, of this you can switch to something else. Like $system.OBJ.ExportUDL, or some other internal methods
##class(%Atelier.v2.Utils.TextServices).GetTextAsArray()
##class(%Compiler.UDL.TextServices).GetTextAsArray()
Dmitry, thanks for the advice. The first function is not available in this Cache version and it will actually export, not just convert code to an array. The Atelier one calls the $preprocess command in question inside its stack and Atelier is not available in this Cache version either. The last function would be perfect but it also calls the $preprocess command in question and this is exactly where the call for this specific class dies, inside $preprocess.
Well, just noticed the version you have, any chance to upgrade such an old version to at least 2016.2
Unfortunately not for the time being.
Is the problematic class particularly large?
That was one of the first ideas that I checked before posting here. Yes, it is large comparing to most other package classes but two much larger classes from the same package have been imported alright.
So, you just need help in find the place in the class which cause an error?
I would suggest to try removing each class member one by one, until you’ll narrow it to one member, and maybe you’ll realize why it’s happening.
If a specific class member causes this, yes, that might work indeed. I need to try it.