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

Feature-request: Project level extensions #55985

Closed
OysteinAmundsen opened this issue Aug 8, 2018 · 5 comments
Closed

Feature-request: Project level extensions #55985

OysteinAmundsen opened this issue Aug 8, 2018 · 5 comments
Assignees
Labels
extensions Issues concerning extensions under-discussion Issue is under discussion for relevance, priority, approach

Comments

@OysteinAmundsen
Copy link

OysteinAmundsen commented Aug 8, 2018

Hi.

As a consultant, I work on a lot of different projects all the time. I would really like to use VsCode for all of them, but that would mean I would have to install a lot of extensions, and only use a different fraction of them per project.

It would be really nice if I could install extensions "globally" (for all projects and all instances of VsCode), or on a project level (only installed and taking up memory space and CPU power within the given project).

Perhaps we could also have an autoinstall_extensions.json in the .vscode folder, similar to the recommended extensions.json, which would download and install extensions locally for this project (in a .gitignore'd folder inside ./.vscode perhaps?), first time a developer opens the project in vscode. That would make setting up a development environment for new developers a breeze. Just clone a git repo, open in vscode and wait for vscode to set up all extensions based on repo's configuration.

@vscodebot vscodebot bot added the extensions Issues concerning extensions label Aug 8, 2018
@OysteinAmundsen
Copy link
Author

This is mislabeled by the vscodebot. This is a feature-request.

@OysteinAmundsen OysteinAmundsen changed the title Project level extensions Feature-request: Project level extensions Aug 8, 2018
@ramya-rao-a
Copy link
Contributor

or on a project level (only installed and taking up memory space and CPU power within the given project).

An extension only takes up memory/cpu when its activated. So if you are on C# project but also have the python extension installed, then the latter doesnt get activated at all. And so doesnt use up any resources. This is controlled in the activation events of the extension which is declared by the extension author. (Python extension would activate on .py files and not .cs files)

But of course, there may be extensions that have declared themselves to be activated on all file types.

Have you tried to disable/enable extensions by workspace?

That would make setting up a development environment for new developers a breeze. Just clone a git repo, open in vscode and wait for vscode to set up all extensions based on repo's configuration.

Yes that would make things easy indeed, but we want avoid installing anything on the user's machine without their explicit approval/request. The recommendation system followed by the user choosing "Install All" on the prompt does what you need.

which would download and install extensions locally for this project

We manage extensions centrally and there is a lot of code around this assumption. Having extensions installed in different locations for each project would complicate things. This can also end up with some extensions repeated across workspaces. The enable/disable extensions by workspace feature was implemented to ease such pain points.

@ramya-rao-a ramya-rao-a added the under-discussion Issue is under discussion for relevance, priority, approach label Aug 8, 2018
@OysteinAmundsen
Copy link
Author

OysteinAmundsen commented Aug 8, 2018

In this request, I admit that I have a nodejs mindset regarding extensions (dependencies in node), which are installed either globally or locally to a project. I admit it might not be the best approach and it definitely would take a lot of diskspace (ref the node_modules mess).

But it mildly annoys me when I have an editor which is so configurable and so lightweight by nature, and I'm able to really streamline it for development on a particular tech-stack - that I have to take the same extensions with me to a totally different tech-stack on the next project.

The recommendation system followed by the user choosing "Install All" on the prompt does what you need.

Actually it doesn't, in this case. It prompts user to install extensions required for this project globally. If I, as a developer, use "Install all" uncritically for every project, I end up having several extensions which might do the same functionality in different implementations. Some of which in my experience actually make vscode crash or behave unpredictable if activated simultaneously.

I want to look at extensions like what you've done with settings. Where we can have global settings, user settings or workspace settings. Yes, I can disable extensions per workspace, but it seems cumbersome to go through every extension each time I open a new project, and check if these can play nicely with each other.

What if extensions were installed centrally, but with an additional config stating if the extension should be available for all projects by default (globally) or only available for an array of projects? That would also prevent activation of "duplicate" extension functionality (unless one is installed globally and the other on a project level... hmmm...)

@ramya-rao-a
Copy link
Contributor

I understand. Most of your concerns are covered in the below issues
#51658
#49826
#18386
#40239

I'll be closing this issue in favor of the existing ones.
Please feel free to comment/upvote/update the other issues.

@OysteinAmundsen
Copy link
Author

Brilliant. Good to see that I'm not the only one having these thoughts.

@vscodebot vscodebot bot locked and limited conversation to collaborators Sep 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
extensions Issues concerning extensions under-discussion Issue is under discussion for relevance, priority, approach
Projects
None yet
Development

No branches or pull requests

3 participants