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

All extensions are removed when switching profile #6

Closed
andreloty opened this issue Jul 8, 2019 · 10 comments

Comments

@andreloty
Copy link

commented Jul 8, 2019

When I switch the profile all extensions are removed.
You can watch what happens here:

https://www.loom.com/share/273be9b0949b46109ae83f576e9c165f

@aaronpowell

This comment has been minimized.

Copy link
Owner

commented Jul 10, 2019

Sorry, I'm not understanding the problem. When you switch a profile it'll look at what extensions have been saved for that profile, add the ones that aren't in the workspace and remove the ones that are.

This relies on an API exposed by VS Code for the loaded extensions, and if you don't reload VS Code between profile switches (which is what the notification popup prompts you to do) VS Code thinks extensions that have been removed weren't removed. That would explain why switching between the two profiles shows the removal of extensions that should've previously been removed, VS Code wasn't reloaded and thus the API I rely thinks they still exist.

@andreloty

This comment has been minimized.

Copy link
Author

commented Jul 10, 2019

Thats the problem...
When I switch the profile, all extensions are removed and are not installed again, even if they are configured...
Until last update when I install the extension and tried it first time, it was not necessary to reload VSCode.

@Kadrei

This comment has been minimized.

Copy link

commented Jul 11, 2019

I just installed this Extension on my Code Instance - Saved the profile and then loaded it without changing anything in between. This extension then proceeded and backuped (and then removed) all extensions. According to the README (as far as I understood) I was expecting the extensions to stay as they were all there when I saved the profile.

@aaronpowell

This comment has been minimized.

Copy link
Owner

commented Jul 11, 2019

@andreloty @Kadrei are you able to provide me with your settings.json file so I can import it and have a test?

@andreloty

This comment has been minimized.

Copy link
Author

commented Jul 11, 2019

shure...

settings.zip

@aaronpowell

This comment has been minimized.

Copy link
Owner

commented Jul 19, 2019

@andreloty Having a look at your settings.json file the extension is behaving as to be expected, there's no entry for profileSwitcher.extensions, which is what the extension uses to track the extensions that should be included as part of the profile you're switching to.

Since there's no entry it takes this as a "no extensions should be loaded" and goes ahead and removed all extensions.

A likely cause of this is the upgrade from the 0.2 to 0.3 release, where the extensions-per-profile support was added. If you'd created your profile prior to 0.3 it didn't have it.

The easiest fix is to open VS Code, get all your extensions installed and then save the profile, which will force the creation of the property in settings.json, then repeat for your other profiles (or edit the settings.json file by hand).

Admittedly, the migration from 0.2 to 0.3 was quite a hard breaking change, I just hadn't anticipated many people actually using the extensions!

@Kadrei

This comment has been minimized.

Copy link

commented Jul 19, 2019

For me it was a freshly installed version of the plugin so should not be an upgrade problem

@andreloty

This comment has been minimized.

Copy link
Author

commented Jul 19, 2019

@aaronpowell don't you worry man...

A likely cause of this is the upgrade from the 0.2 to 0.3 release, where the extensions-per-profile support was added. If you'd created your profile prior to 0.3 it didn't have it

it was my suspicious...

The easiest fix is to open VS Code, get all your extensions installed and then save the profile, which will force the creation of the property in settings.json, then repeat for your other profiles (or edit the settings.json file by hand)

i will give it a try

Admittedly, the migration from 0.2 to 0.3 was quite a hard breaking change, I just hadn't anticipated many people actually using the extensions!

let's hope for many others to use !!

@aaronpowell

This comment has been minimized.

Copy link
Owner

commented Jul 22, 2019

@Kadrei it's likely the problem I outlined in the comment on #7 (#7 (comment)) where there were false reports of completion meaning that you end up with corrupt extensions.

@aaronpowell

This comment has been minimized.

Copy link
Owner

commented Jul 22, 2019

Closing for now as the problem is really my lack of guidance on the upgrade from versions. I'll have to work out how to better handle big changes next time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.