Written by

Developer at Healthy Reply
Question Pietro Di Leo · Apr 10

Using InterSystems Server VSCode extension in client side mode with projects

Hi everyone,

I was wondering if it is possible to use the InterSystems Server VSCode Extension to work in client side mode but importing locally the content of a project without having to choose the files manually.

It would be awesome to have all project-related assets synchronized in one go. Relying on InterSystems Projects (.prj files) would be convenient for several reasons:

  1. Projects bundle different file types (CLS, MAC, INT, CSP). Importing the project as a whole is much more efficient than picking individual files piece by piece.
  2. ​Manual selection is error-prone; using a project ensures that no dependency or specific file is left behind during the transition to client-side.
  3. ​It’s the easiest way to share work. Telling a colleague to "work on Project X" is far more effective than sending a list of files.
  4. For those monitoring the server or working in heterogeneous teams, knowing which classes belong to a specific project is vital for tracking changes and maintaining order.

​Is there a way to make the VS Code extension "project-aware" when importing files locally?

Comments

DC AI Bot · Apr 10 Bot

The InterSystems Server VSCode Extension does not directly support importing all files within a project (.prj) locally in client-side mode based on the project file. You need to manually select and export files from the server to your client-side workspace as follows:

  1. Navigate to the InterSystems view container by selecting the InterSystems button.
  2. Within the ObjectScript Explorer view, locate and select the documents (files) to export from the server to your client workspace.
  3. Right-click on your selection and choose “Export” from the context menu. Alternatively, use the Command Palette to run the “ObjectScript: Export Code from Server” command and select the desired files for export.
  4. Files are exported to the /src/ sub-folder within your workspace root by default. This can be configured using the “objectscript.export.folder” setting 12.

While this process allows exporting multiple files at once, automatic synchronization of a project’s entire scope using its .prj file is not mentioned. Synchronization of individual files or managing dependencies across a project still requires careful configuration and manual verification 13.


Sources:

Tell us more:
Don't like the style
Not factually correct
Didn't fully follow instructions
Refused when it shouldn't have
Being lazy
More...
Submit
0 0
John Murray · Apr 10

Your 3rd point particularly interests me:

It’s the easiest way to share work. Telling a colleague to "work on Project X" is far more effective than sending a list of files.

What are you currently doing for source control?

0
Pietro Di Leo  Apr 10 to John Murray

Hi John, well it actually depends on the project. For our internal developments on InterSystems IRIS, we use Bitbucket for version control (with some difficulties due to the server side nature of IRIS). For deploy, since integration with Git-based workflows can be challenging, we still rely mostly on manual deployments using XML exports of projects (but we are working a lot on this recently). 

On the contrary, for InterSystems TrakCare, where we work as contractors, we must follow the InterSystems approach, specifically using Perforce as centralized source control. In this case, given the strict data privacy requirements, we don’t have access to the whole TrakCare codebase, which is the main dependency. Therefore, we adapted to InterSystems workflow which is heavily based on project-driven development and CCR-based deployment.

Do you have any advice on how to work and deploy in these use cases (particularly the first)?

0
Brett Saviano · Apr 10

No, this is not possible. Studio Projects (.PRJ files) are a legacy server-side concept. The equivalent for client-side editing is to put all the related code that would be in a .PRJ file in a single source code repo (using git for instance). If someone needs to "work on project X" they can `git clone` the repo. Version 3 of the extension will sync all local changes with the server for you so you don't have to manually sync everything, but if you have to you can right-click on the top level folder (usually `src`) and select `Import and Compile`.

0
Pietro Di Leo  Apr 10 to Brett Saviano

Thank you for your response, Brett. I expected that this wasn’t possible, but I wanted to confirm. We already use the Import and Compile in most cases, but I was wondering if there might be something to use projects in client side.

0