Article
· Oct 25, 2019 1m read

Gotcha when roundtripping Zen classes in UDL format using %Compiler.UDL.TextServices on Unix-type platforms before 2018.1

When dealing with a support issue of one of our Deltanji source control sites this week I learned that if you're using InterSystems versions earlier than 2018.1 on Unix-type platforms it's possible that a class you export in UDL format will subsequently fail to import. So I'm posting this information here in case it helps other folk.

If you're doing Zen development your classes are likely to contain ClientMethod definitions scripted in Javascript. Prior to 2018.1 the UDL import processor used by methods of %Compiler.UDL.textServices doesn't have access to a Javascript parser on the Unix-type platforms. So when reading a UDL stream that contains a method coded in Javascript it resorts to counting { and } characters to work out where the method code ends.

Unfortunately it also counts these characters inside JS comments, so if there are more { than } in the comments the UDL processor ends up reporting that the input stream ended prematurely.

Once you find the offending comment it's easy enough  to remove the { or add a matching } without breaking anything.

Alternatively, see if you can get an adhoc build with devchange ALE3098 added.
 

Discussion (0)1
Log in or sign up to continue