You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Download latest compatible extensions prior to VS Code update #125417
Extensions using latest API (or new APIs in coming Stable releases), they are now suffering from some "down time" as the upgrade of VS Code and extensions don't happen at the same time. Though we can't improve every indivual scenario, but we can improve this case:
Extensions publish a new version targetting new VS Code version
VS Code upgrades, window reloads
The extension activation fails as the API is not compatible
Check the extension page, there is a reload request for the extension
Another window reload fixes the problem.
Often that users find the extension stop working, for example, they can't open Jupyter notebook anymore even though a compatible version of the Jupyter extension is already available.
Suggestion:
When there is a new version of VS Code
download the binaries
fetch all latest compatible extensions for the new binary, unzip them
Users restart VS Code to upgrade, the latest extensions are activated
VS Code version: Code - Insiders 1.57.0-insider (20df877, 2021-06-03T06:38:36.085Z)
OS version: Windows_NT x64 10.0.19041
Reacted by Don Jayamanne, Alessandro Fragnani, Ian Huff, Harald Kirschner, Carlo Cardella, Julio Cezar Silva, Aaron Dill and heartacker
Jupyter extension and VS Code Insiders publish update to new API overnight
User already has VS Code open
Jupyter extension update automatically downloads
VS Code update is available. In my experience sometimes this gets automatically downloaded, and sometimes I have to use the Help menu to check for pending updates, at which time the download takes place. After the download happens (manually or automatically), sometimes I notice a notification to restart VS Code, other times not. Failure to restart VS Code at this point is the problem, as the new Jupyter extension build has already been loaded
Here are examples of times that this has happened to Jupyter extension users.
Does it cause the old version of VS Code to load newly unzipped extensions - for eg., if open a new window without restarting VS Code?
Good point, we can't unzip them until VS Code restarts (instead of window reloads). If we have hooks for that, we can unzip when VS Code shuts down.
How about not enabling the extension if it is not compatible?
The problem with this approach is it's the same experience as enabling incompatible extensions, for notebooks or custom editors. When reloading a window which has notebooks open, the extensions need to be activated successfully otherwise users won't see the notebook editor loaded correctly. Also still users would have no idea what to do if the extensions are disabled.
Does it cause the old version of VS Code to load newly unzipped extensions - for eg., if open a new window without restarting VS Code?
Actually we can prevent this from happening, if VS Code always loads the compatible extension folder, other than finding the one with greatest version.
I want to also call out that something like this is incredibly important for Language Packs which use the engine version to snap to the translations provided. We want to give the users a translated experience upon upgrading VS Code and we can't do that if we don't update the language pack until after upgrading VS Code.
Actually we can prevent this from happening, if VS Code always loads the compatible extension folder, other than finding the one with greatest version.
Yeah that will be useful.
When there is a new version of VS Code
download the binaries
fetch all latest compatible extensions for the new binary, unzip them
Users restart VS Code to upgrade, the latest extensions are activated
A bunch of update states have information about the upcoming update, including the product version that's about to be installed. Note that this can always be ahead, the same or even behind (when we roll back). Also note that users can also cancel updates midway, so that's another problem you're gonna have.
Activity
joyceerhl commentedon Jun 3, 2021
The scenario I usually run into looks like this:
Here are examples of times that this has happened to Jupyter extension users.
rebornix commentedon Jun 3, 2021
Joyce Er (@joyceerhl) should this already be addressed by #121749?
DonJayamanne commentedon Jun 3, 2021
Whoa, I was always under the impression this was already happening, sounds like VS Code looks for updates after it has been updated and loaded.
Yes please, this sounds like a very good feature.
joyceerhl commentedon Jun 3, 2021
Peng Lyu (@rebornix) thanks for the pointer to #121749, Jupyter extension should adopt this.
sandy081 commentedon Jun 4, 2021
Peng Lyu (@rebornix)
Does it cause the old version of VS Code to load newly unzipped extensions - for eg., if open a new window without restarting VS Code?
How about not enabling the extension if it is not compatible?
rebornix commentedon Jun 4, 2021
Good point, we can't unzip them until VS Code restarts (instead of window reloads). If we have hooks for that, we can unzip when VS Code shuts down.
The problem with this approach is it's the same experience as enabling incompatible extensions, for notebooks or custom editors. When reloading a window which has notebooks open, the extensions need to be activated successfully otherwise users won't see the notebook editor loaded correctly. Also still users would have no idea what to do if the extensions are disabled.
rebornix commentedon Jun 4, 2021
To reduce the download time and prevent the extensions download/unzip slowing down the restart/reload
rebornix commentedon Jun 7, 2021
Actually we can prevent this from happening, if VS Code always loads the compatible extension folder, other than finding the one with greatest version.
TylerLeonhardt commentedon Jun 7, 2021
I want to also call out that something like this is incredibly important for Language Packs which use the engine version to snap to the translations provided. We want to give the users a translated experience upon upgrading VS Code and we can't do that if we don't update the language pack until after upgrading VS Code.
sandy081 commentedon Jun 8, 2021
Yeah that will be useful.
CCing João Moreno (@joaomoreno) for any insights on update hooks
joaomoreno commentedon Jun 8, 2021
Sandeep Somavarapu (@sandy081) The update service fires events: https://github.com/microsoft/vscode/blob/bae654ad1d8c0baaa67e1400a694e91893347fa4/src/vs/platform/update/common/update.ts/#L86
A bunch of update states have information about the upcoming update, including the product version that's about to be installed. Note that this can always be ahead, the same or even behind (when we roll back). Also note that users can also cancel updates midway, so that's another problem you're gonna have.
rebornix commentedon Jun 8, 2021
The cost of this is we download extensions which users might not need, which is bad but does not break the product.
#125417 update extensions compatible with newly available VS Code ver…
Update extensions compatible with newly available VS Code version (#2…
Update extensions compatible with newly available VS Code version (mi…
#125417 restart extension host for updating extensions instead of reload
restart extension host for updating extensions instead of reload (#20…