Question
· 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.

Best,

Mike

Discussion (12)4
Log in or sign up to continue

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

Peter
 

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.

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
https://georgejames.com