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

Update of preferences from VSCode plugin triggers multiple overwrite popup confirmation #6845

Closed
crawr opened this issue Jan 8, 2020 · 6 comments · Fixed by #7110
Closed
Assignees
Labels
bug bugs found in the application preferences issues related to preferences vscode issues related to VSCode compatibility

Comments

@crawr
Copy link

crawr commented Jan 8, 2020

Description

It seems there is an inconsistency between the vscode.workspace.getConfiguration().update API in VSCode and Theia.
Even though there are no changes in the configuration, the update is triggered and is trying to overwrite the contents in the settings.json file.

Is there a way to turn off the overwrite confirmation?
Is this a bug in the FileSystem watcher?

Reproduction Steps

Extension: Zowe Explorer
Whenever the browser is refreshed or left idle for a while, the following popup appears multiple times:
overwrite

OS and Theia version:
Windows 10
latest Theia

@vince-fugnitto
Copy link
Member

Related #6786

@vince-fugnitto vince-fugnitto added the bug bugs found in the application label Jan 8, 2020
@akosyakov akosyakov added preferences issues related to preferences vscode issues related to VSCode compatibility labels Jan 8, 2020
@akosyakov
Copy link
Member

akosyakov commented Jan 8, 2020

@vince-fugnitto yes, I think the fix should handle both cases

@venkatzhub
Copy link

@akosyakov - The above mentioned error message is happening very frequently. Our end users/customers of Zowe Explorer are experiencing this a lot and are complaining about it. Wondering if there is a workaround of some sort to at least minimize the frequency of the pop up, while you are working on the fix?

@vince-fugnitto
Copy link
Member

@akosyakov - The above mentioned error message is happening very frequently. Our end users/customers of Zowe Explorer are experiencing this a lot and are complaining about it. Wondering if there is a workaround of some sort to at least minimize the frequency of the pop up, while you are working on the fix?

I think if you don't want to display the dialog any longer until there is a proper fix, you can unbind the following:

bind(FileShouldOverwrite).toDynamicValue(context => async (file: FileStat, stat: FileStat): Promise<boolean> => {
const labelProvider = context.container.get(LabelProvider);
const dialog = new ConfirmDialog({
title: `The file '${labelProvider.getName(new URI(file.uri))}' has been changed on the file system.`,
msg: `Do you want to overwrite the changes made to '${labelProvider.getLongName(new URI(file.uri))}' on the file system?`,
ok: 'Yes',
cancel: 'No'
});
return !!await dialog.open();
}).inSingletonScope();

@venkatzhub
Copy link

@vince-fugnitto - Thank you, we will try that.

akosyakov added a commit to akosyakov/theia that referenced this issue Feb 9, 2020
It resolve following issues:
- dirty editors are respected
- edits are applied in thread safe fashion

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Feb 9, 2020
It resolve following issues:
- dirty editors are respected
- edits are applied in thread safe fashion

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
@akosyakov
Copy link
Member

I had to fix tests yet, but could someone try please whether you can reproduce it with #7110?

akosyakov added a commit that referenced this issue Feb 10, 2020
It resolve following issues:
- dirty editors are respected
- edits are applied in thread safe fashion

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Feb 10, 2020
It resolve following issues:
- dirty editors are respected
- edits are applied in thread safe fashion

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Feb 10, 2020
It resolve following issues:
- dirty editors are respected
- edits are applied in thread safe fashion

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Feb 10, 2020
It resolve following issues:
- dirty editors are respected
- edits are applied in thread safe fashion

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Feb 10, 2020
It resolve following issues:
- dirty editors are respected
- edits are applied in thread safe fashion

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Feb 11, 2020
It resolve following issues:
- dirty editors are respected
- edits are applied in thread safe fashion

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Feb 11, 2020
It resolve following issues:
- dirty editors are respected
- edits are applied in thread safe fashion

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Feb 12, 2020
It resolve following issues:
- dirty editors are respected
- edits are applied in thread safe fashion

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Feb 12, 2020
It resolve following issues:
- dirty editors are respected
- edits are applied in thread safe fashion

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit to akosyakov/theia that referenced this issue Feb 24, 2020
It resolve following issues:
- dirty editors are respected
- edits are applied in thread safe fashion

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
JesterOrNot pushed a commit to JesterOrNot/theia that referenced this issue Mar 12, 2020
It resolve following issues:
- dirty editors are respected
- edits are applied in thread safe fashion

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application preferences issues related to preferences vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants