Skip to content

Download latest compatible extensions prior to VS Code update #125417

Description

@rebornix

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:

  1. Extensions publish a new version targetting new VS Code version
  2. VS Code upgrades, window reloads
  3. The extension activation fails as the API is not compatible
  4. Check the extension page, there is a reload request for the extension
  5. 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

Activity

  1. joyceerhl commented on Jun 3, 2021

    @joyceerhl
    Contributor

    The scenario I usually run into looks like this:

    1. Jupyter extension and VS Code Insiders publish update to new API overnight
    2. User already has VS Code open
    3. Jupyter extension update automatically downloads
    4. 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.

  2. rebornix commented on Jun 3, 2021

    @rebornix
    ContributorAuthor

    as the new Jupyter extension build has already been loaded

    Joyce Er (@joyceerhl) should this already be addressed by #121749?

  3. DonJayamanne commented on Jun 3, 2021

    @DonJayamanne
    Contributor

    tch 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.

  4. joyceerhl commented on Jun 3, 2021

    @joyceerhl
    Contributor

    Peng Lyu (@rebornix) thanks for the pointer to #121749, Jupyter extension should adopt this.

  5. sandy081 commented on Jun 4, 2021

    @sandy081
    Member

    Peng Lyu (@rebornix)

    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?

  6. rebornix commented on Jun 4, 2021

    @rebornix
    ContributorAuthor

    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.

  7. rebornix commented on Jun 4, 2021

    @rebornix
    ContributorAuthor

    if 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.
  8. rebornix commented on Jun 7, 2021

    @rebornix
    ContributorAuthor

    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.

  9. TylerLeonhardt commented on Jun 7, 2021

    @TylerLeonhardt
    Member

    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.

  10. added
    extensionsIssues concerning extensions
    feature-requestRequest for new features or functionality
    install-updateVS Code installation and upgrade system issues
    and removed
    under-discussionIssue is under discussion for relevance, priority, approach
    on Jun 8, 2021
  11. sandy081 commented on Jun 8, 2021

    @sandy081
    Member

    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

    CCing João Moreno (@joaomoreno) for any insights on update hooks

  12. joaomoreno commented on Jun 8, 2021

    @joaomoreno
    Contributor

    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.

  13. rebornix commented on Jun 8, 2021

    @rebornix
    ContributorAuthor

    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.

  14. added 2 commits that reference this issue on Mar 5, 2024
  15. added 2 commits that reference this issue on Mar 6, 2024
  16. locked and limited conversation to collaborators on Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

extensionsIssues concerning extensionsfeature-requestRequest for new features or functionalityinstall-updateVS Code installation and upgrade system issueson-testplanpapercut 🩸A particularly annoying issue impacting someone on the team

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions