Skip to content
This repository has been archived by the owner on Jul 18, 2022. It is now read-only.

All extensions are removed when switching profile #6

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

All extensions are removed when switching profile #6

andreloty opened this issue Jul 8, 2019 · 10 comments

Comments

@andreloty
Copy link

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

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

@aaronpowell
Copy link
Owner

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
Copy link
Author

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
Copy link

Kadrei 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
Copy link
Owner

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

@andreloty
Copy link
Author

shure...

settings.zip

@aaronpowell
Copy link
Owner

@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
Copy link

Kadrei commented Jul 19, 2019

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

@andreloty
Copy link
Author

@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
Copy link
Owner

@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
Copy link
Owner

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants