Mike Davidovich · Jan 3, 2020

Cache 2018 and Studio and Git

I searched to see if there was a previous question on this, but I didn't quite find anything.  Please link if you think this has been answered before (I have a feeling it has): what are the barriers to source control using Cache 2018 and Studio?  

I'm trying to figure out how to create a local repository but I can't access the folder structure in the USER namespace for my local instance.  If I could, it would be as simple as navigating there in Git Bash and doing a 'git init' and then I can push changes to a remote repo for control.  When I was doing Advent of Code, I found myself copying and pasting my code into a text file on my PC and then running my Git commands on that directory.  It was a cumbersome step and risked that the code in my directory wasn't the same as the code in the namespace.  

Another problem then seems to be if I wanted to clone that repo into a namespace on the server (or really another local namespace since I can't find the folder structure in the local namespace, let alone the server side), I can't find a way to do this.  

As you offer thoughts, please consider:

- We just upgraded to Cache 2018 and probably won't get IRIS for quite some time

- We are looking into VS Code and the integration of ObjectScript and Git there, however there are issues someone else is working on there that I can't speak to

- We don't have Altiler, nor do we plan to get it

- As a larger company, our PCs are quite locked down as to what we can and can't install (even developers)

Looking forward to what the discussion is.



6 0 12 627


Hi Mike,

As you have seen, Class files are stored within Caché and not on the file system. We have Studio hooks available as documented here. These allow you to write code to perform the export and import automatically as you interact with your classes in Studio. After files have been automatically exported, you will be able to run Git commands to commit and push your changes as desired.

Instead of doing all of this yourself, there does seem to be an Open Exchange app available that does something like this. I have not used this before, but @Alexander Koblov may be able to add more details of how complete it is


It is worth noting that with Atelier, APIs were created to automatically store the classes on the file system. I believe these APIs are used by VSCode's ObjectScript integration also

How would you run those commands/git commands? Through pipes or what because $ZF does not work anymore on our system

What do you mean by $zf does not work for anymore? There are no reasons that it would not work, if it have not used on windows with interactivity. And anyway, there are no more reasons to stay with Studio anymore, while VSCode already available

I mean exactly what I said, it doesn’t work. Errors out now after healthshare upgrade. Also the documentation says ZF is deprecated so how can we recommend it’s usage

please share the doc link you are referring to.  ZF calls are still supported and we use them for our source control integration within InterSystems.  The zf(-1) has been deprecated and replaced with zf(-100) and you can certainly use that to do the same thing but may need to change your zf input slightly to use 100.

Also, exposing our code to some other system is not something we can do

As we don't have source control, I have been experimenting with Tortoise SVN to create a local source control on my own PC.

This involves exporting the source files from Cache in .xml format to my source control folders and managing the commits via the Tortoise SVN file controls 

Its not ideal but it has worked for me as an experiment to have personal control for my work.

Hello @Ken Earl 

Since you're using a VCS for a personal project. You might want to check Port and see if it fits your needs.

You can also see how it works by reading the tutorial  that I posted sometime ago.

Is Git a mandatory requirement for you? If not, did you consider our Deltanji product? Your source code gets managed within the environments it executes in, with no need for export/import to files nor for a separate build/deploy toolchain. Deltanji is fully supported on Cache 2018 and Studio, as well as on InterSystems IRIS. It's also well integrated with VS Code.

John Murray
Senior Product Engineer
George James Software