Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Locking files #1468

Open
Patresko opened this issue Jan 24, 2025 · 6 comments
Open

Locking files #1468

Patresko opened this issue Jan 24, 2025 · 6 comments

Comments

@Patresko
Copy link

Hello,

I got a question. Im using VS code, my colleague is still with Studio and we are programming on server side. Problem is that none of us can see if the file is locked.

When we were both on studio, I was not able to edit same file while my colleague was inside. Is it possible that VS Code does not triggere any lock and also does not reading lock from studio?

@gjsjohnmurray gjsjohnmurray transferred this issue from intersystems-community/intersystems-servermanager Jan 24, 2025
@gjsjohnmurray
Copy link
Contributor

gjsjohnmurray commented Jan 24, 2025

You are correct. The InterSystems ObjectScript extension for VS Code interacts with the server using REST requests, so it is not able to hold a server-side lock for the duration of an unsaved change existing in the editor, which is what Studio does. Studio is able to do this because each Studio connection has a dedicated server-side process that persists until Studio disconnects.

When several developers work concurrently in a single namespace it becomes even more important to use server-side source control. This will help you manage situations where concurrent development projects collide and want to make changes to the same classes etc.

George James Software (my employer) offers a mature and full-featured enterprise-grade source control solution called Deltanji which is well integrated with VS Code, Studio and the IRIS Portal editors.

Alternative solutions also exist.

@isc-bsaviano
Copy link
Contributor

@Patresko John is correct that the extension's asynchronous architecture means we can't handle concurrency the same as Studio. I strongly suggest you move away from the shared development environment model and towards isolated environments per developer (or per change, like the Pull Requests we make in this repository). You can use either server-side or client-side source control in an isolated model and you won;t have these locking issues.

@Patresko
Copy link
Author

Source control will work even he stay with Studio or both of us must be in VS Code? Im not sure if he is going to move in near future to VS Code.

@isc-bsaviano
Copy link
Contributor

Yes, server-side source control will work for mixed Studio/VS Code. Is there a particular reason your colleague hasn't tried making the switch yet? We would be interested in hearing their feedback in case it's something we can address. Studio has been removed from kits starting with 2024.2 so they should start considering the switch.

@Patresko
Copy link
Author

Not sure he is in studio more then 15y so I guess just because of habit. I was quiet happy to move because I was using VS Code and when I join my current job 6 year ago I was quiet disappointed to use Studio because it was such a crap comparing to VS Code.

But working with projects was better in Studio or maybe I just dont know how to use it properly in VS Code. In VS code I see all the project and then I can navigate through it but dont know how can I load just particular project and dont see other projects.

In studio once project was loaded then was tab "Project" and "Namespace"

I would expect if I double click on some project
Image

then some tab will appears here

Image

@isc-bsaviano
Copy link
Contributor

@Patresko The documentation page for working with server-side projects can be found here. Does this help you get started?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants