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

vscode.extensions Doesn't Update On Installing / Removing / Disabling Extensions without restarting #14444

Closed
shanalikhan opened this issue Oct 25, 2016 · 53 comments
Assignees
Labels
api extension-host Extension host issues feature-request Request for new features or functionality *out-of-scope Posted issue is not in scope of VS Code
Milestone

Comments

@shanalikhan
Copy link

shanalikhan commented Oct 25, 2016

I need to configure my extension code-settings-sync with the feature that when a user installs the extension and doesn't restart the vs code and neither enable the extension, I need to make the sync backup for that extension when installed.


Installation Process : when installed and not restarted.

Expected Behaviour:
vscode.extensions.all should show the newly installed extension with enabled false flag

So I can get that extension and make a sync.

Current Behaviour
It doesn't appear in vscode.extensions.all until I restart the code by clicking the enable button or other way.


Uninstall Process: when uninstalled and not restarted.

Expected Behaviour:
vscode.extensions.all should not show that extension or some flag like removed true

So I can get that extension remove from user's list and make a sync excluding that extension.

Current Behaviour
It doesn't remove from vscode.extensions.all until i restart the code


This is the scenario for installing/ uninstalling.
Same goes for disabling and enabling the extension I need to know which extensions are disabled or enabled.

For the details @alexandrudima has explained very well on the comment below: #14444 (comment)

@shanalikhan shanalikhan changed the title Newly Installed Extensions (not enabled and restarted) doesnt appear in vscode.extensions Installing / Removing Extensions (not enabled and restarted) doesnt update in vscode.extensions Oct 25, 2016
@sandy081
Copy link
Member

@shanalikhan I would like to what is the need to have an extension that is disabled... I am trying to understand the functionality/feature that requires this.

Thanks

@shanalikhan
Copy link
Author

shanalikhan commented Oct 27, 2016

@sandy081

When you see my extension the main idea behind is to sync all the user installed extensions and settings file sync across multiple platforms.

When user install one extension and save the settings when it opens the code in office it does download the latest extensions and settings.

Initially user were able to sync these things manually to server and download then manually, now my aim is to make this process automatic so when user change any settings it upload all the settings file and the extensions to the server and download the settings and extensions when code is opened in other computer or office.

For now, the automatic process is working fine with the settings as when the settings change it automatic upload the settings and other data files in the server but for extension i am facing issue when the extension is download it doenst initialte the upload process as that object doenst contains all the extension that were downloaded untul the code is restarted so it would be better to add the downloaded extension in the list of extensions in the code but with a flag that shows its not enabled yet waiting for restart so i can save the settings.

Hope you know all the process now :)

@sandy081
Copy link
Member

Why do you need to sync the settings for a newly installed extension given that extension is not enabled or running. Settings of such extensions are not available they are active. It means user cannot modify settings of them.

So, I am thinking what is the use case of Syncing such settings which are not active and not modified?

@shanalikhan
Copy link
Author

i think Installing the extension should be seperate from the scenario of enabled or not.
Also when user install the extension i havent seen any property to disable the extension.

Also when user installs the extension on next restart the it will be enabled already so why not updating the object even on installing with a flag its disabled or enable ,as its already updating on restarting.

This is for my scenario for now, if it adds in the object many other doors to code for other extension would open

@sandy081
Copy link
Member

@shanalikhan Sorry, I still do not understand that what is the issue / what functionality is missing when you get the settings after restart?

Is it that you are trying to sync / export installed extensions information ?

I think it is not a good idea just to open the doors for everybody without a proper use case.

@shanalikhan
Copy link
Author

shanalikhan commented Oct 27, 2016

Anything can be applied by some extension A that has funtionality when user downloads any extension B , A should performed some task.

Is it that you are trying to sync / export installed extensions information ?

Yes, instantly on when the extension is downloaded.

@sandy081
Copy link
Member

Anything can be applied by some extension A that has funtionality when user downloads any extension B , A should performed some task.
A proper use case should define the task.. not some task :)

So your issue is that if user installs an extension and does some export / sync using your extension (without restart), you do not have information about the installed extension and same with uninstalled extension ?

@sandy081 sandy081 added feature-request Request for new features or functionality extension-host Extension host issues labels Oct 27, 2016
@sandy081
Copy link
Member

@alexandrudima Here is a scenario where extension writers need more extension info (enabled / disabled) to export user preferences like installed extensions and others

@alexdima
Copy link
Member

I think the underlying desire here (and @shanalikhan correct me if I'm wrong) is to synchronize Visual Studio Code's state across machines. If that is the case, then there are a lot more (some even more basic) things to consider:

  • theme
  • installed extensions (also the disabled ones)
  • selected extension enable/disable options
  • view state (what files are in the working set, where is the cursor position inside them)
  • all other things we store in mementos (there are a lot more, such as last string searched, etc etc)

Regarding the disabled extensions, I think the problem is that @shanalikhan 's code might think that the extension got uninstalled meanwhile it is only temporarily disabled. We can think about listing disabled extensions in vscode.extensions.all, but then we'd need to prohibit calling activate() on such disabled extensions.

@shanalikhan Am I close to understanding your scenario?

@shanalikhan
Copy link
Author

shanalikhan commented Oct 27, 2016

Yes, Thanks
Look forward for it.

There is already another issue opened for API support for Themes and file icons:
#12178

and Disabling Extensions with API :
#15466

May be one single feature can cover then all in upcoming build so Code Settings Sync extension will start working with its full features

@alexdima alexdima removed their assignment Jan 9, 2017
@shanalikhan shanalikhan changed the title Installing / Removing Extensions (not enabled and restarted) doesnt update in vscode.extensions vscode.extensions Doesn't Update On Installing / Removing / Disabling Extensions without restarting Feb 19, 2017
@shanalikhan
Copy link
Author

There are above 150 votes for this feature.
Any update when it will be done

@sandy081
Copy link
Member

@shanalikhan Looks like the most wanting feature. Will bring it up during our next milestone plan. Thanks.

@sandy081 sandy081 added this to the Backlog milestone Feb 27, 2017
@wsmelton
Copy link

Now that it has been decided this is going to be added to the milestone plan....can the prompt in VS Code when we update this extension be removed?

@JelaMiraj
Copy link

+1

3 similar comments
@fimius23
Copy link

+1

@jpike88
Copy link

jpike88 commented Apr 25, 2017

+1

@Rocky-L
Copy link

Rocky-L commented Apr 25, 2017

+1

@shanalikhan
Copy link
Author

shanalikhan commented Aug 30, 2018

@alexandrudima @sandy081

I have recently converted Settings Sync extension installation to CLI Based.
It would be nice if you guys can let me know what are the plans for API.

That's a big fish. No plans as of now. Will update you when we do. Thanks.

This issue has been opened since 2 years
If there is no plan for 2 more years i will convert the Settings Sync from all the extension related things to CLI based methods.
Like currently i am reading from extensions.all object - will convert to CLI --list-extensions it will take alot of time to migrate all the things to CLI in Settings Sync but i want to be sure about the plans.

@sandy081
Copy link
Member

@shanalikhan Sorry about it and it is still the same status about it. Since it's been some time and things would have changed and it seems this issue got distracted with multiple other requests, can you please consolidate your requests?

@shanalikhan
Copy link
Author

can you please consolidate your requests

Yes, can you please explain what do you mean.

My issue is the first post, and this comment is what i need #14444 (comment)

@sandy081
Copy link
Member

What I meant is to validate your features list and consolidate them in the description. It will be easy to get lost if not in description.

@shanalikhan
Copy link
Author

alright, it would be great if you can raise this issue in your next meetings with the teams and let us know about the updates when would be possible to implement this.

@shanalikhan
Copy link
Author

image

@GuskiS
Copy link

GuskiS commented Nov 5, 2018

Are there any news on this?

@Gerschtli
Copy link

More than two years after opening this issue, a minimum of at least 1000 user want this feature and all we do is waiting? Is there anything we can do to speed things up? It's a bit annoying how useful extensions trying to help automate things are blocked by such a minimal extension API..

@pradyunsg
Copy link

https://code.visualstudio.com/updates/v1_31#_no-reload-on-install

There's definitely work happening on this.

@sandy081
Copy link
Member

@shanalikhan With 1.31 release we expose extensions.onDidChange when extensions change, like when an extension is installed/uninstalled/enabled/disabled/

But an extension is added or removed only if it supports no reload.

Let me know if this is good enough, if not, please update the additional requirements on top of it?

@cig0
Copy link

cig0 commented Apr 30, 2019

Hi @sandy081,

What I understand is needed is an API that exposes all the installed extensions and enablement state per workspace, that also differentiates between built-in and external ones.

This is specially true when one works with different projects involving different technology stacks -- what makes enabling and disabling extensions per workspace a bless.
This, I think, is a behavior a lot of us are looking for VSC to have.

Right now, every time I set up a new project, I have to spend again a good amount of time to manually replicate the configuration on the other (two) machines.

Thanks!

@steshie-cmd
Copy link

My experience with VS Code so far is not pleasant at all. First, I have tried to install the 'Live Server' extension from the list of extensions, but there seems to be no extensions at all in my VS Code editor. Is there something I am missing please
Screenshot_2020-07-29_19-12-21

@steshie-cmd
Copy link

Secondly, I have tried to type in the basic command of '$ whoami' in the command line but the editor is not returning any results at all
5

@vscodebot vscodebot bot added the *out-of-scope Posted issue is not in scope of VS Code label Nov 5, 2020
@sandy081
Copy link
Member

sandy081 commented Nov 5, 2020

We support Settings Sync feature inside VS Code as a core feature now - #2743

@anasir975
Copy link

@shanalikhan Hi
I have a similar issue to yours. Did the team come up with any solution for determining the number of disabled extensions through an API? I posted the issue but I was referred to this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api extension-host Extension host issues feature-request Request for new features or functionality *out-of-scope Posted issue is not in scope of VS Code
Projects
None yet
Development

No branches or pull requests