-
Notifications
You must be signed in to change notification settings - Fork 29.3k
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
Add support to deactivate auto-updating disabled extensions #113155
Conversation
Could you take a look, why the Mac OS build has timed out and maybe restart it? |
@sandy081 is there anything I can do to help getting the PR reviewed and merged? |
@sandy081 I was wondering whether you already had a chance to look at the PR (and the failing build) and if there is anything I can do to help you merging the PR? |
@plainerman Sorry for not responding soon. I will take a look at this in Feb milestone and get back to you with feedback. |
@sandy081 I have just resolved merge conflicts that came up and the PR is now ready again to be reviewed. Thanks for getting back to me. |
Hey @sandy081, I saw that you have pushed this issue back to the march milestone. I was hoping that we could look at this issue soon. Thanks |
Will take this up in this milestone. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
Outdated
Show resolved
Hide resolved
Thank you for the review! I will take a look at it in the next few days and will get back to you. |
Do not auto update disabled extensions
@sandy081 I have implemented some of the requested changes, but after rebasing my branch against the latest main branch, I have difficulties with node-gyp and cannot compile the project as of now. It will probably take until the following week, until I have time to resolve the remaining issues and look into those errors. In the meantime, could you point me in the right direction on how I can check when an extension was enabled globally? And possibly, where the best place is to call In the meantime, I will revert this PR into a draft, and will come back to you. Thank you |
To know if extension was enabled globally you can check the extension's enablement state. Eg:
Listen on enablement changed event ( |
Thank you for the code pointer! I have now resolved all of your suggestions. If there are any further changes, just let me know. |
@plainerman Thanks for the changes. After trying out I felt having two settings for disabling auto updates and disabling auto updates of disabled extensions seems confusing for the user. Instead I think having one setting that defines what to update would be simple. Change the existing
Action in the UI can also be changed to choose among above 3 values. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@plainerman Thanks for the changes. After trying out I felt having two settings for disabling auto updates and disabling auto updates of disabled extensions seems confusing for the user.
Instead I think having one setting that defines what to update would be simple. Change the existing extensions.autoUpdate
setting to take enum value "all", "enabled", "none"
and defaults to "all"
. For backward compatibility we can still accept boolean values.
"extensions.autoUpdate": true | false | "all" | "enabled" | "none"
Action in the UI can also be changed to choose among above 3 values.
Thanks @sandy081, I will try to get it ready by tomorrow. |
Still some work to do ...
I have implemented most changes, apart from the UI controls. I imagine the new change auto update behavior to show a submenu like here: but was not able to find out how to properly create such a menu (as of now). Further, I could not find an instance where only one option can be selected.
vscode/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts Lines 500 to 504 in 0179466
Any suggestions are appreciated but I will look more into it in the next few days. |
I have now adopted the code to to this three-options approach. A few points I would like to mention:
Thank you @sandy081 |
introduce configure auto update action
@plainerman Thanks a lot for the changes. You are right that supporting both boolean and string ( Hence I simplified the current proposal by just adding one string value Supported this with improved UI: Added above changes on top of your changes and merged the PR |
Wonderful, thank you very much! |
This PR fixes #76879
With the current version, disabled extensions are updated in the background. When manually triggering an update process, the user is explicitly asked if disabled extensions should be updated.
This PR transfers this desired behavior (as stated in issue #76879) to auto-updating extensions. Users can now set
extensions.autoUpdateDisabledExtensions
and decide whether disabled extensions should be updated or not (the default is false, meaning to not update disabled extensions). Further, this PR includes the required code to ignoring disabled extensions in the update process.To test this fix, you can install an outdated extension, disable it and see that it won't be updated (unless you set the correct configuration).