-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
8963-globalstorage-improvement-for-sqltools #9055
8963-globalstorage-improvement-for-sqltools #9055
Conversation
Do you know what VS Code actually does when requesting to store workspace data but no workspace is opened? Your PR makes it store data globally when using the workspace storage API and no workspace is opened, does VS Code too? |
added code improvement for case where extension sends incorrect argument for isGlobal in StorageMain.$set method. Signed-off-by: Dan Arad <dan.arad@sap.com>
cccb1bc
to
2b0cc7e
Compare
Thanks for reviewing @marechal-p. In regard to your comments:
As far as I can tell (after debugging VS Code also), workspaceStorage is initialized on startup in VS Code - regardless if a workspace is opened or not. In Theia, workspaceStorage is dependent on existence of a workspace.
Logic for storing globally if workspace doesn't exist, was not implemented by me in this PR: in case it is global storage (isGlobal = true) then it retrieves theia/packages/plugin-ext/src/main/node/plugins-key-value-storage.ts Lines 91 to 97 in 6798167
|
@kittaakos @marechal-p Awaiting your continued review - if possible we would like to enter it to this week' release. |
@kittaakos @marechal-p do you think we can merge this? |
@amiramw, I am not familiar with this logic to make a decision without further investigation. However, writing into the global storage when no workspaces are opened does not feel good. I debugged into VS Code yesterday, and I can see, the workspaceStorage is indeed initialized although no workspace was opened.
It seems like this is what we need to do to be VS Code compatible. Cannot you patch/customize the |
@kittaakos
First, thanks @kittaakos for reviewing/replying. Second, in regard to your comment above: So in short I'm asking why not fix this bug now so that relevant extensions could work properly and add a task to a Theia architect to contemplate future requirements? I would appreciate also your opinion @vince-fugnitto. Thanks. |
With the proposed change, we would write to the global storage when there is no workspace open, and that's the problem, isn't it? So you fix a bug and introduce another. |
I don't agree - in current Theia implementation, that is the current logic - if there is a workspace/Storage - write to it, if not use global - that is underlying logic in |
I believe I expressed in #8963 the validity of the issue, the expectation that storage be available without a currently opened workspace is incorrect (from what I understand), and while there may be an exception there is no loss of functionality. I'm not sure we should patch our side for an extension which may be doing something incorrect, like the assumption it can set storage at any state. |
@vince-fugnitto |
closing in favor of #9137. |
Signed-off-by: Dan Arad dan.arad@sap.com
added code improvement for case where extension sends incorrect argument for isGlobal in StorageMain.$set method.
What it does
Fixed #8963
How to test
Review checklist
Reminder for reviewers