-
Notifications
You must be signed in to change notification settings - Fork 50
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
Automatically sync all file events with the server that happen inside a client-side workspace folder #1454
Comments
Thanks for opening this issue @TwaHendrik! I believe this issue a duplicate of #1451 (see #1451 (comment)). |
@TwaHendrik After thinking about this more, I'm a little concerned that implementing this could have some unintended consequences. The VS Code API for watching the file system does not batch events, so if you have a lot of classes and routines in your git repo the server will be hammered with a lot of requests. VS Code will also only be able to sync changes that happen when it's open, so if you change branches and then open VS Code the changes wouldn't be synced automatically. I still am generally in favor of this idea, but I'd like to think about it more before adding it to that existing PR. |
I don't think there's a good answer here. Sounds like the only way this works elegantly is if you change branches from within VS Code. Is it true that changing branches via a CLI wouldn't work whether or not VS Code is open? And even if you change branches in VS Code you trigger all those requests to the server. I fear this feature could be impossible to get right. |
@isc-rsingh If VS Code has the folder open I can respond to file system events, even if they originate from the git CLI and not the VS Code UI. I need to do more research on what git does when you switch branches. For example, if there are 1000 files and only 1 changes content when you switch branches, does 1 file system event get fired, or 1000? If the former then this could work fine. If the latter, not so much. |
This wouldn't be git specific by the way. Changes that happen to the files on disk triggered by any application would be picked up by VS Code. |
Exactly what I was wondering |
@isc-rsingh I did a quick test and git only changes the files that it has to. In the example above, only one change event would fire, not 1000. I can't guarantee that other SCM tools/tools in general behave this way, but this increases my confidence that this feature is worth implementing. |
Agreed
regards,
Raj
---
Raj Singh | PM, Developer Experience | InterSystems
https://www.intersystems.com/developing-with-intersystems-iris/
…________________________________
From: Brett Saviano ***@***.***>
Sent: Thursday, October 31, 2024 8:41:38 AM
To: intersystems-community/vscode-objectscript ***@***.***>
Cc: Raj Singh ***@***.***>; Mention ***@***.***>
Subject: Re: [intersystems-community/vscode-objectscript] Support for Git Feature Branching (Issue #1454)
@isc-rsingh<https://github.com/isc-rsingh> I did a quick test and git only changes the files that it has to. In the example above, only one change event would fire, not 1000. I can't guarantee that other SCM tools/tools in general behave this way, but this increases my confidence that this feature is worth implementing.
—
Reply to this email directly, view it on GitHub<#1454 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AA4YC5YQZJPV7W5MO2OFS4LZ6IQQFAVCNFSM6AAAAABQZRE43WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBZG42TGMBYHA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I'm going to tackle this as part of #1401 |
We have noticed that a switch between two branches leads to a code change in the workspace. However, the change is not automatically forwarded to the IRIS instance. This leads to an inconsistent state. It would be great if the workspace was the only place of truth. This would enable code reviews and later deployment via CI/CD.
The text was updated successfully, but these errors were encountered: