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

Support synchronising global state #86679

Closed
sandy081 opened this issue Dec 10, 2019 · 14 comments
Closed

Support synchronising global state #86679

sandy081 opened this issue Dec 10, 2019 · 14 comments
Assignees
Labels
feature-request Request for new features or functionality on-testplan settings-sync
Milestone

Comments

@sandy081
Copy link
Member

sandy081 commented Dec 10, 2019

Support synchronising global state

  • locale (display language)
  • other UI state (activity bar icons, status bar entries, views layout, donotaskagain options...)
@sandy081 sandy081 added feature-request Request for new features or functionality settings-sync labels Dec 10, 2019
@sandy081 sandy081 added this to the December/January 2020 milestone Dec 10, 2019
@sandy081 sandy081 self-assigned this Dec 10, 2019
@sandy081
Copy link
Member Author

@dbaeumer How feasible it is to move locale configuration to settings?

@dbaeumer
Copy link
Member

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

You are right and it might impact the performance. If so, lets not move it to settings and I can sync locale separately.

@dbaeumer
Copy link
Member

Thanks!

@sandy081 sandy081 changed the title Support synchronising user locale Support synchronising global state Jan 6, 2020
@sandy081 sandy081 modified the milestones: January 2020, February 2020 Jan 27, 2020
@sandy081 sandy081 modified the milestones: February 2020, On Deck Feb 5, 2020
@sandy081 sandy081 mentioned this issue Feb 9, 2020
6 tasks
@gandalfsaxe
Copy link

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:

  1. The global settings that applies to all machines
  2. Work/Home machine specific settings that only applies to work machines or personal machines.
  3. Project specific settings (e.g. .vscode/settings.json in 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
Copy link
Member Author

sandy081 commented Mar 2, 2020

Sessions across machines:

Can you please elaborate more about the issue?

@gandalfsaxe
Copy link

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

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

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

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

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.).

@sandy081
Copy link
Member Author

Syncing global state (core) is supported now. Next step is to let state owners to opt in to sync the state - #93332

@eamodio
Copy link
Contributor

eamodio commented Mar 31, 2020

@sandy081 how will extensions opt-in or out of this?

@sandy081
Copy link
Member Author

Currently it is only supported for core. Planning to extend this to extensions in next milestone.

@github-actions github-actions bot locked and limited conversation to collaborators May 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality on-testplan settings-sync
Projects
None yet
Development

No branches or pull requests

4 participants