Question
· Nov 2, 2023

VSCode server version check not always working

Using VSCode in a team.

Classes are edited locally and then saved to server.

Sometimes if we save a change to a class the "version on the server" does not happen or does not function properly and the class gets overwritten.

All the intersystems extensions are updated.

objectscript.overwriteServerChanges is false

This has the potential for serious issues if it happens in a persistent class, but it is difficult to reliably recreate.

1. Is there a command to do the check manually( without saving)?

2. Is there a some setting I can change to help with this?

Product version: IRIS 2021.1
$ZV: IRIS for UNIX (Red Hat Enterprise Linux for x86-64) 2021.1.1 (Build 324U) Thu Feb 24 2022 13:20:39 EST
Discussion (5)4
Log in or sign up to continue

@Nicki Vallentgoed 
There isn't a way to check if a file is out of date without saving it. I think the best change you could make to your workflow would be using a private server instead of a shared server. Since you're working with local files, you shouldn't care about the server version since it's not the source of truth. If you used your own private development server you could turn off the version checking logic and let your source control system handle differences.

This is a good reason for implementing the server-centric paradigm for code editing and for source control. We at George James Software have a growing number of sites that use our mature and powerful Deltanji tool, which handles deployment as well as versioning, is hugely flexible and configurable, and now has a unique ability to manage the individual configuration items of an interoperability production. Deltanji runs within the InterSystems platforms, handling your code where it is runnable instead of constantly having to export and reimport it. Deltanji can also handle code artifacts that live outside the InterSystems platform, such as images, scripts and stylesheets.

Sounds like you are using client-side source control in a shared development environment ... this is just a formula for frustration.  Either use private dev instances with client-side source control, or use server-side source control with a shared dev instance.  This was the theme of a presentation we did at G.S. a couple of times.  See https://community.intersystems.com/post/new-video-shared-development-21s...
NOTE - This was given a 2nd time where we used VSCode and not Atelier but I can't find that posting for some reason.   However the principles are identical whether you're using Atelier or VSCode ... they use the same APIs to manage source with the server.