Download latest compatible extensions prior to VS Code update #125417
Description
Activity
- addedpapercut 🩸A particularly annoying issue impacting someone on the teamA particularly annoying issue impacting someone on the team
on Jun 3, 2021 The scenario I usually run into looks like this:
- 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.
- Select kernel options missing when after running a jupyter notebook cell in VScode Insiders vscode-jupyter#6036 (comment)
- Extension activation failed on TypeError vscode-jupyter#5344 (comment)
- 2021.4.678042391 throws TypeError: s.notebook.onDidChangeCellExecutionState is not a function vscode-jupyter#5251
as the new Jupyter extension build has already been loaded
Joyce Er (@joyceerhl) should this already be addressed by #121749?
DonJayamanne commented
on Jun 3, 2021 ContributorMore actionstch all latest compatible extensions for the new binary, unzip them
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.
Peng Lyu (@rebornix) thanks for the pointer to #121749, Jupyter extension should adopt this.
fetch all latest compatible extensions for the new binary, unzip them
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?
- addedunder-discussionIssue is under discussion for relevance, priority, approachIssue is under discussion for relevance, priority, approach
on Jun 4, 2021 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.
Reacted by Julio Cezar Silvaif we have hooks for that, we can unzip when VS Code shuts down
To reduce the download time and prevent the extensions download/unzip slowing down the restart/reload
- Download new VS Code and new compatible extensions which don't work in current VS Code
- When users restart VS Code, on shutdown or launch, unzip the newly downloaded extensions.
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.
Reacted by Julio Cezar Silva- addedextensionsIssues concerning extensionsIssues concerning extensionsfeature-requestRequest for new features or functionalityRequest for new features or functionalityinstall-updateVS Code installation and upgrade system issuesVS Code installation and upgrade system issuesand removedunder-discussionIssue is under discussion for relevance, priority, approachIssue is under discussion for relevance, priority, approach
on Jun 8, 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.
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 activatedCCing João Moreno (@joaomoreno) for any insights on update hooks
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.
Also note that users can also cancel updates midway, so that's another problem you're gonna have
The cost of this is we download extensions which users might not need, which is bad but does not break the product.
Reacted by João Moreno, Julio Cezar Silva, ngld and heartacker- added a commit that references this issue
on Mar 6, 2024 - locked and limited conversation to collaborators
on Jun 11, 2024
Issue Type: Feature Request
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:
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:
VS Code version: Code - Insiders 1.57.0-insider (20df877, 2021-06-03T06:38:36.085Z)
OS version: Windows_NT x64 10.0.19041