Question
· Apr 21, 2023

Compile for a previous version of Health Connect?

Is it possible to compile classes on a current version of the platform for a previous version?   So using a compiler switch to compile classes that will run on a prior version?

We are implementation partners building a set of tools and we would like to ensure that the code will run on earlier versions we don't have access to.

Product version: IRIS 2022.3
Discussion (3)2
Log in or sign up to continue

Are you exporting it as OBJ-only, or are you okay exporting it for a previous version which they will then load into their instance and compile?  

E.g. if you use Do $System.OBJ.SetQualifiers("/exportversion=2017.2") it will export the code in Caché 2017.2 format.  *However* this will not catch if you use syntax or updated APIs which were not supported in 2017.2.  You should really get a copy of the target version of software from the WRC (kits or containers) and at least do a compilation test there.  

Thanks.  We will be exporting as code to compile on the customers' version (in this specific instance it is 2017) but ideally we just would like to ensure it will run on any prior version (within reason) without having to maintain a bunch of prior versions and test compile on each. The exportversion qualifier may be useful, but it's any dependencies like updated APIs you mention that we are wanting to catch.

There is no way, to catch the possible issues for the previous version of IRIS.

The best case scenario is if you automate the build process, for instance with Docker, and test a compile stage on different versions of IRIS. But the ability to successfully compile may not prove that it will work, it would be better to have some unit tests, which will check it.

One more thing, may help, to check it, using the such tool as ObjectScript Quality, can help with checking System's API version. Where you can set the oldest supported version of IRIS, and during the scan, it can check if Methods are available in that particular version.