-
Notifications
You must be signed in to change notification settings - Fork 405
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 option to opt out of extensions #386
Comments
Hi @andreilg 👋 devcontainers/cli#262 introduced an experimental Wondering if that could be sufficient for your scenario? I could help make this flag more formalized. Let me know if your scenario requires more control/options to pick & choose the customizations/extensions, then we could chat further. |
Thank you for your response. The way I'm currently using devcontainers is through a That cli flag seems helpful but I don't necessarily want to turn off all customizations or even all extensions but rather pick and choose within the My suggested example above is how I envision this could work since it allows for granular control of customizations. |
Thanks for the clarification.
Shouldn't "features": {
"ghcr.io/devcontainers/features/node:1": {
"extensions": [
"dbaeumer.vscode-eslint": false
]
}
} Currently, every key-value inside this object is expected to be a Feature option. Doing something like this needs a spec change & would need to reserve 'extensions' keyword for this specific purpose. This could potentially be a breaking change for authors who have been using Instead, I am thinking of a similar but a little tweaked approach to your suggestion.
The Features' option expects camel case, hence, shouldn't break any existing dev configs. We could make a spec change to support this. @Chuxel / @bamurtaugh Would appreciate your thoughts on this one 👀 |
Thanks for the tag, @samruddhikhandale! And thanks for opening, @andreilg - this is an interesting scenario. @samruddhikhandale I like your idea above that avoids potentially breaking users. I'd be interested to see if other folks mention this as a helpful or important addition for them. I'm going to pop this issue in our dev container community Slack channel to get some more 👀 |
Yes, my mistake. The array should also be an object I believe. I have updated my original post.
I see what you mean since the azure-cli feature has an
That looks like a good way of going about it. Edit:
With the nature of codespaces, I feel like any possibility to reduce bloat will always be desirable and I imagine a lot of people are in a similar situation and just find the lack of control over customization to be a minor annoyance that can add up over time. |
In the devcontainer.json we use "customizations": {
"vscode": {
"extensions": {
"dbaeumer.vscode-eslint": false,
"ms-python.python": true
}
}
}, (The current |
A similar request was reported in devcontainers/action#139. |
If we limit this to just extensions, the proposal in microsoft/vscode-remote-release#415 isn't a bad one. Just prefix the name with a "-" to omit. "customizations": {
"vscode": {
"extensions": {
"-dbaeumer.vscode-eslint",
"ms-python.python"
}
}
} |
any progess on this issue ? |
The problem we face is that we do not use However, right now, as we attach to a running container, it seems that VS Code (or Dev Containers) automatically infers some stuff and automatically decides what to install. It installs I wonder who has come up with this decision to force installing extensions upon teams. I would immediately fire him. This decision is one of the worst decisions a team can make on a global scale. My suggestion is that you don't infer anything at all. In other words, DO NOT assume anything for us, please. Let us decide what is best for us. Do not force extensions upon us if we have not opted-in Also as I specified in the other issue, this inference is a poor decision because:
|
+1 for this... I'm struggling a lot with this limitation. |
In my case, I'm using Vue3 in my project but since we want the take-over mode of Volar, we want to disable the built-in ts-server. See https://vuejs.org/guide/typescript/overview.html#volar-takeover-mode |
@Chuxel @samruddhikhandale @bamurtaugh hi, we need an answer here please. It's beyond ridiculous that your company somehow decided to silently shove loads of extensions down everyone's throat, some of which are even freemium and spam you with requests to sign up for a premium plan. I got these by just adding PHP to my features:
That's FOUR extensions I don't want, for just one package. Why would anyone think this was a good idea, and most importantly why has nothing been done in almost a year after this issue has been opened? |
Most if not all of those are very standard extensions for a PHP dev to use in VS Code. |
What do you know about other people's standards?? It seems pretty obvious that it is not the case for everyone, otherwise this issue would not exist. There are multiple extensions one can choose from, and they have every right to do so. Or one might simply not need any at all, as sometimes you only need PHP to run some services that rely on it. |
@solid-pixel You're not wrong. I know not everyone uses the same PHP extensions. I just said they're common.
I've talked to plenty of PHP devs that use these extensions, so I know they're common. But I never claimed everyone uses them. |
This is getting off topic. It's clear from the previous comments that overriding the extension list of a devcontainer feature is something that would be desirable. Let's keep the comments constructive and discuss how this should work, what the API should look like, usecases, etc. rather than pointing fingers, discussing the popularity/standardization of PHP extensions and requesting urgency among maintainers. |
@h7x4 The decision is very very clear. Microsoft MUST NOT assume default extensions for any team. Instead of opt-out it should be opt-in. Any team that wants any extensions should specify them with their IDs. That's it. And if teams want to create conventions across multiple projects (cross-project), then the But if they don't make that decision (which is extremely annoying and arrogant if they don't), then at least they should create this contract in
|
If someone finds a way to, at least, execute a command after all extensions are loaded, then each user could at least remove unnecessary extensions like this: |
I think the idea of using I would like to be able to disable all extensions at once as described in this comment ( I want to do it via |
@aetos382 you just described #386 (comment) |
Note that the |
The commit you mentioned seems only to edit the specifications of the devcontainer.json file. Is the actual functionality also included? If so, how can I already use this? I tried Dev Containers 0.325.0-pre-release with the latest VSCode Insiders, but it does not work for me. I used the following syntax to exclude intellicode from C# Dev Kit:
|
|
Any update on this? I don't want the suggested extensions by any given feature. I rather mine. |
I believe this ^ should be available in VS Code stable as well. @chrmarti should we close this issue out? |
Yes, this is available with the |
@chrmarti Is there any documentation of this usage you can point me to? Much appreciated. |
@alexandreczg Can't find it right now, I'll see where in the docs we can add it. There was a release note: https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_85.md#opt-out-of-extensions |
Some features install extensions along with themselves and I'm not always interested in them. For example, the
golang.Go
extension that is installed in the Go feature or thedbaeumer.vscode-eslint
extension that is installed in the Node feature are not extensions that I use.To prevent bloat it would be very nice if extensions could be opted out of in feature options.
Here is an example of how I think this could work:
The text was updated successfully, but these errors were encountered: