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

Allow specifying a version for workspace recommended extensions #138048

Open
sullyD64 opened this issue Nov 29, 2021 · 24 comments
Open

Allow specifying a version for workspace recommended extensions #138048

sullyD64 opened this issue Nov 29, 2021 · 24 comments
Assignees
Labels
extensions Issues concerning extensions feature-request Request for new features or functionality
Milestone

Comments

@sullyD64
Copy link

sullyD64 commented Nov 29, 2021

Sometimes we have this issue where a certain extension which the project depends on gets a new release which breaks the extension or other related tooling; we can fix the issue by manually rolling back the version.

It would be nicer if the extensions.json, which allows us to set recommended extensions for the workspace/project, would allow us to also pinpoint a specific version of the extension. Even better if this allows us to use semver ranges!

The actual extensions.json:

{
  "recommendations": [
    "johnsoncodehk.volar", // always the latest version
  ]
}

The proposed version:

{
  "recommendations": {
    "johnsoncodehk.volar": "0.29.6",
  }
}
@sandy081 sandy081 added extensions Issues concerning extensions feature-request Request for new features or functionality labels Nov 29, 2021
@sandy081 sandy081 added this to the Backlog milestone Nov 29, 2021
@jcready
Copy link

jcready commented Mar 4, 2022

I would also like to have this. We have a large monorepo and a new release of the GitLens extension caused ssh to hang and also introduced "premium" features that we don't want and also managed to automatically install another extension! It's difficult to ask everyone to manually go to the extension and "Install another (older) version". Being able to specify a version would fix this issue.

@roldengarm
Copy link

This is also important for us. As there's a bug in the Azure Account extension (see here) we can only use up to 0.9.11

@n3rdyme
Copy link

n3rdyme commented Sep 2, 2022

This is very problematic when tools like your own ms-dotnettools.csharp drop support for, or require newer version of, frameworks to be installed. Please allow either the recommended approach above or consider the following:

{
  "recommendations": [
    "ms-dotnettools.csharp@v1.24.4"
  ]
}

@ghaschel
Copy link

ghaschel commented Oct 4, 2022

+1 for this

@isidorn isidorn added the *out-of-scope Posted issue is not in scope of VS Code label Dec 6, 2022
@VSCodeTriageBot
Copy link
Collaborator

We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider.

If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

Thanks for your understanding, and happy coding!

@VSCodeTriageBot VSCodeTriageBot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 6, 2022
@KholdStare
Copy link

@isidorn How exactly is this out of scope?

@johnsoncodehk
Copy link
Contributor

I think we can ask https://marketplace.visualstudio.com/items?itemName=GARAIOAG.garaio-vscode-unwanted-recommendations to support it.(Created by @Cyclodex)

@CaringDev
Copy link

Given even some MS extensions break every now and then and take very long to recover (e.g. microsoft/vscode-remote-release#8157) this (specifying a version range) would be a very valuable addition.

@MeikTranel
Copy link

MeikTranel commented May 17, 2023

I cannot provide anything new except that we rely on an extension that breaks in our usecase when using the most recent version - please reconsider @sandy081 @isidorn

This goes exactly against the spirit of what i'm trying to evangelize for at work - pinning sdk versions and tooling to make changes to our work environment an explicit change at every opportunity to control these things - may it be global.json, csprojs, package.json.

Given we already have the option to switch to a different extension version i dont think this would be much of a hassle to implement - the ideas brought forth here regarding the version strings á la package.json already fit well into the picture and it could be implemented without breaking by defaulting versionless strings to the latest version.

I would really like to have a conversation here.

@ccampanale
Copy link

My specific use case is regarding nrwl.angular-console; an Angular project which my team collaborates on is not remotely prepared to move this codebase to use NX Workspaces but the latest extension (v18+) requires it. Setting the extension version to the latest version of v17 allows us to continue to use this very helpful extension and follow our documented development SOPs.

We're considering dev-containers for this and other projects which thankfully allow us to recommend extensions for the VS Code server. But the latest version of these extensions are installed after confirming the prompt which itself only shows after confirming and opening the workspace once attached to the container (due to microsoft/vscode-remote-release#3665 which is preventing opening workspaces directly). Essentially, this presents a really poor developer UX which could at least be made partially better if this process didn't have to be followed up with rolling back an extension version.

  1. Launch dev container (build and attach using task).
  2. Confirm the prompt: "This folder contains a workspace file. Do you want to open it?"
  3. Confirm the prompt: "Install recommended workspace extensions?"
  4. Open extensions
  5. Locate NX Console
  6. Install previous version

Three steps - and possibly more with time - could be avoided by supporting the ability to specify recommended versions for recommended extensions.

Please reconsider support.

@AlexCLeduc
Copy link

Please consider supporting pinning versions in workspace recommendations. My team is using an extension which pairs with a python package. The extension frequently (but unpredictably) drops support for older versions of the python package and everyone's editors break until we coordinate to upgrade the python package.

I think one of the following syntaxes may be friendlier to opt-in than OP's

{
    "recommendations": [
        "ms-python.python", //latest
        "ms-python.python@2022.0.0", //with version suffix
        {
            // as dictionary
            "id": "ms-python.python",
            "version": "2022.0.0"
        }
    ]
}

@Cyclodex
Copy link

I think we can ask https://marketplace.visualstudio.com/items?itemName=GARAIOAG.garaio-vscode-unwanted-recommendations to support it.(Created by @Cyclodex)

Let's discuss it over here Cyclodex/vscode-unwanted-extensions#1

I already added some ideas and made some changes/progress.

@pipinfitriadi
Copy link

pipinfitriadi commented Oct 19, 2023

@sandy081

I think this issue should be reopen, i use flake8 extension for my repo, but after update version it no longer support python 3.7, so i need feature to add extension version for recommendation

Related to this issue microsoft/vscode-flake8#219 (comment)

@marcel-22
Copy link

I agree. I believe this issue may cause problems on long(er) term. Version control is also about the ability to maintain existing software versions.

@mslinn
Copy link

mslinn commented Nov 5, 2023

This ability is important. Please reopen it and get it done.

@uditrana
Copy link

Has there been any reasoning for why this is not being considered by the VS Code team?

@andyn
Copy link

andyn commented Dec 28, 2023

This functionality is essential for working with legacy codebases, especially now that the official Python plugin has dropped support for versions older than 3.8.

@mslinn
Copy link

mslinn commented Dec 28, 2023

The ability to pin a version of an extension has recently been added to VSCode. I wrote about how it works in an article:
https://www.mslinn.com/ruby/4600-vscode-ext-jekyll.html#dbgprob

@jcready
Copy link

jcready commented Dec 28, 2023

@mslinn that does not solve this issue.

@rhaladej-cen55759
Copy link

Please consider supporting pinning versions in workspace recommendations as this functionality is essential for working with legacy codebases.

@Cyclodex
Copy link

Hi all, current possible workaround suggestion:

I just published a pre-release of my extension "Unwanted Extension", where you can also define version numbers, in addition to the extensions.

The extension will bring you a notification, if the "unwanted extension" is installed & enabled.
There is no automatic "disable" functionality possible in VSCode right now, AFAIK.

The latest pre-release, does support version definitions (SEMVER) where you can define the version ranges which should throw a warning. (Make sure you install the "pre-release" (1.1.1), not the "Release version".
More information in the extension description.

Feel free to report issues or further ideas here: https://github.com/SoulcodeAgency/vscode-unwanted-extensions

Cheers

@starball5
Copy link

Related on Stack Overflow: VS Code file .vscode/extensions.json select custom version of one extension

@paulobndes
Copy link

Just to say "me too!" and display my usecase:

I need to connect and develop in an old Red Hat machine. I don't have authority to upgrade this machine.

Latest VS Code complains that link to the C++ libraries, so I must use an old VSCode and fix the version of the Remote SSH extension

I also has an old unsupported Python. Python extension must be an old one to work with it.

Latest Python extension uses extensions to format and lint my code. I also must fix pylance version to work with it.

Now I have an wiki page so all developers of my team can develop in a sane enviroment. Some of them don't bother and commit unformatted and unlinted code.

Its hell.

@sandy081 sandy081 reopened this Apr 29, 2024
@sandy081 sandy081 removed the *out-of-scope Posted issue is not in scope of VS Code label Apr 29, 2024
@sandy081 sandy081 modified the milestones: Backlog, On Deck Apr 29, 2024
@sandy081
Copy link
Member

sandy081 commented Apr 29, 2024

Reopening to see if we can plan to support this. Thanks everyone for your feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extensions Issues concerning extensions feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests