You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The biggest problem moving it to settings is performance. It is its own file since we need to read that file early on in the startup process and we didn't want to read large files and parse them. So would we be able to sync it separately ?
There are two issues I think are relevant to this:
1. Sessions across machines: You might want to think about how you want to handle session restores across different machines that doesn't have access to the same files, perhaps by design (e.g. work machine, home machine). I encountered this issue a while back in the portable version of VSCode, which actually prompted me to stop using the portable version: #81340
2. Settings across machines: This is also part of a bigger problem of User/settings.json not being able to import other settings files. Ideally you should be able to set up a hierarchy of settings:
The global settings that applies to all machines
Work/Home machine specific settings that only applies to work machines or personal machines.
I'm not 100% sure how this is relevant to this issue since not many details are provided. Perhap you could elaborate beyond the title "Support synchronising global state" what this means?
I just meant everything I said in #81340 - but I can re-iterate it here if necessary. If you're looking for VSCode to restore editor session across different machines, as the portable version inherently does, you're going to have potentially not access to the same files. So you get errors that you cannot open file X, Y and Z when you open VSCode on another machine.
For example, I'm on machine A and have files X, Y and Z open.
Then I start machine B and only files X are available, but Y and Z are not (e.g. some Cloud app not installed). I will then get errors that these files are not available on machine B. If I then continue to work, and restart machine A, it might lose files Y and Z being open because they were not part of the latest session on machine A.
Fair enough 🙂So though the title of this issues says "Support synchronising global state", your inital post seem to suggest this is just about the locale setting for now (e.g. country + language)?
Yeah currently we only support syncing display language as part of global state. Planning to extend it to more global state like activity bar icons, views visibilities etc.,
Makes sense to add the basic functionality first 👍
I hope that somewhere down the line that grouping of session will be considered at some point (Group A will share these states, Group B will share these states, all groups will share these states etc.).
Activity
sandy081 commentedon Dec 13, 2019
Dirk Bäumer (@dbaeumer) How feasible it is to move locale configuration to settings?
dbaeumer commentedon Dec 13, 2019
The biggest problem moving it to settings is performance. It is its own file since we need to read that file early on in the startup process and we didn't want to read large files and parse them. So would we be able to sync it separately ?
sandy081 commentedon Dec 16, 2019
You are right and it might impact the performance. If so, lets not move it to settings and I can sync locale separately.
dbaeumer commentedon Dec 16, 2019
Thanks!
[-]Support synchronising user locale[/-][+]Support synchronising global state[/+]gandalfsaxe commentedon Mar 2, 2020
There are two issues I think are relevant to this:
1. Sessions across machines: You might want to think about how you want to handle session restores across different machines that doesn't have access to the same files, perhaps by design (e.g. work machine, home machine). I encountered this issue a while back in the portable version of VSCode, which actually prompted me to stop using the portable version: #81340
2. Settings across machines: This is also part of a bigger problem of
User/settings.jsonnot being able to import other settings files. Ideally you should be able to set up a hierarchy of settings:.vscode/settings.jsonin project folders).This issue is being tracked here, and I can see you're already aware of it :) Add support for additional global config files (in addition to settings.json) #17634
sandy081 commentedon Mar 2, 2020
Can you please elaborate more about the issue?
gandalfsaxe commentedon Mar 3, 2020
I'm not 100% sure how this is relevant to this issue since not many details are provided. Perhap you could elaborate beyond the title "Support synchronising global state" what this means?
I just meant everything I said in #81340 - but I can re-iterate it here if necessary. If you're looking for VSCode to restore editor session across different machines, as the portable version inherently does, you're going to have potentially not access to the same files. So you get errors that you cannot open file X, Y and Z when you open VSCode on another machine.
For example, I'm on machine A and have files X, Y and Z open.
Then I start machine B and only files X are available, but Y and Z are not (e.g. some Cloud app not installed). I will then get errors that these files are not available on machine B. If I then continue to work, and restart machine A, it might lose files Y and Z being open because they were not part of the latest session on machine A.
sandy081 commentedon Mar 3, 2020
I see your use case. We have plans to sync open editors state but definitely not in scope of this issue.
gandalfsaxe commentedon Mar 3, 2020
Fair enough 🙂So though the title of this issues says "Support synchronising global state", your inital post seem to suggest this is just about the locale setting for now (e.g. country + language)?
sandy081 commentedon Mar 3, 2020
Yeah currently we only support syncing display language as part of global state. Planning to extend it to more global state like activity bar icons, views visibilities etc.,
gandalfsaxe commentedon Mar 3, 2020
Makes sense to add the basic functionality first 👍
I hope that somewhere down the line that grouping of session will be considered at some point (Group A will share these states, Group B will share these states, all groups will share these states etc.).
#86679 support syncing activity bar icons
sandy081 commentedon Mar 24, 2020
Syncing global state (core) is supported now. Next step is to let state owners to opt in to sync the state - #93332
eamodio commentedon Mar 31, 2020
Sandeep Somavarapu (@sandy081) how will extensions opt-in or out of this?
sandy081 commentedon Mar 31, 2020
Currently it is only supported for core. Planning to extend this to extensions in next milestone.