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

Investigate how to make VSCode properly reload configs #21

Open
maxyu1115 opened this issue Mar 23, 2023 · 2 comments
Open

Investigate how to make VSCode properly reload configs #21

maxyu1115 opened this issue Mar 23, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@maxyu1115
Copy link
Owner

Currently, while an attempt has been made to reload the vscode configs, it doesn't actually work.

While the detection by onDidChangeConfiguration properly triggers the event, my attempt reloading the config with vscode.workspace.getConfiguration doesn't read in the newer configs.

Is there a way to fix this? If not, we need to create a warning/notice for users to reload.

@maxyu1115 maxyu1115 added bug Something isn't working help wanted Extra attention is needed labels Mar 23, 2023
@maxyu1115
Copy link
Owner Author

Also we probably should modify line

extension.loadConfig();

to have a if (event.affectsConfiguration('git-backup-sync')) check as well.

@maxyu1115
Copy link
Owner Author

Mysterious forces are in play, failing to reproduce this... The current loadConfig should be working in most cases at least.

Worst case, we will need to add lines to either restart the extension host vscode.commands.executeCommand('workbench.action.restartExtensionHost');, or reload the window vscode.commands.executeCommand('workbench.action.reloadWindow');. Both will have performance implications and potentially cause issues when working with a remote ssh vscode session.

This bug might only trigger when the autobackup is enabled. We'll tackle this again after #20 is fixed.

@maxyu1115 maxyu1115 removed the help wanted Extra attention is needed label Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant