Cross Caché/IRIS development

Well, we now have two different platforms Caché and IRIS. With so many changes, that it makes so many difficulties to have the same sources for both platforms. I'm not arguing about the reasons for it. Some of the changes are really reasonable.

It's good when I can import code from Caché to IRIS and get it worked after all background job was done. In Caché we have %CacheStorage type used for Storages. In IRIS it automatically converts to %Storage.Persistent. So, If I develop on IRIS, I will have incompatible sources for Caché.

So, it is one of the problems, and I expect more. But I don't see anyways, yet how to deal with it.

I don't want to have two different repositories for sources for IRIS and for Caché. It means that it will be some difference between both of this repositories, and some functionality may be lost.

Does anybody already face with it, how did you solve it? 
How InterSystems solve such issue?

I found that when export class in xml, with qualifier /exportversion=2017.1, it will convert classes back to supported by Caché. But it does not work for UDL format, but what if I don't want to use XML. 

Answers

At first sight in Documatic, it  looks like 

 %Library.CacheStorage

 was just renamed to  

%Storage.Persistent

As a workaround, I would simply try in Caché to make a copy of  %Library.CacheStorage to a new %Storage.Persistent
(a pure rename)  Then compile a class with one and the other and compare the generated .int code.

It's a dirty hack. frown
But I have no hope ISC will ever provide some backward port from IRIS to Caché.

Sorry I have no IRIS at hands and can't try it myself.

 

I tried it now in Caché 2016.2.2 manually overwriting Storage <Type>%Storage.Persistent</Type>.

During compilation it gets automatically set back to <Type>%Library.CacheStorage</Type>
Also in class defintion.

Does this automatic change go back to repository ??? 

Our nearest plan is to continue development in Cache having some kind of code convertor to IRIS. It would be nice if ISC would provide such utility by itself, at least as a starting point for further customisation.

Taking this approach we would not loose any functionality. We confess that we are restricting ourselves to the features available in both platforms this way, but it does not seem to be a huge price for the benefits of single code base.

As long as you don't go for Sharding this might work quite well.

For Sharding the whole storage environment will make a significant difference also in class definitions.
 

As to sharding, we would hardly use it as we don't use persistent objects at all. As to other IRIS advanced system dependent features, we can, but we don't want to port them to Cache. E.g. we can write some code to improve the life in clouds, but we don't need it in Cache because of lack of plans of new Cache deployments in clouds.