Hi @alefragnani ,
just a quick question, I may simply be mislead at some point. Does (local, not GIT) projects sync through the regular VS Code sync normally work?
So far, natively, your project manager saves the 'projects.json' in the user folder in the VS Code folder, and as far as I experienced, the regular settings sync (not the plugin/extension) done through the Microsoft account won't sync projects from one machine to another. I understand I can set "projectManager.projectsLocation" to accept a different place, and I did just that with a folder I sync through another service. Just wanting to know, is there something wrong on my end that VS Code doesn't want to sync projects by the normal MS sync?
Hi @enoversum ,
I didn't play with Settings Sync yet, but as far as I remember from the release notes (while in Insiders release) and the official documentation (after landing on Stable), it seems _session data_ are not synchronized. If that's the case then no, the projects.json won't be synchronized.
I also don't remember any API which extension authors could use, in order to add their own data to the syncing process. So, unless such API exists/appears, Settings Sync couldn't be used to _sync_ your projects. At least, not today.
I wonder if it would worth to change how the extension itself works. I mean, instead of using an external file (project.json) to store user's projects, store them on _User Settings_ directly. Personally, I'm not comfortable about touching (updating) user settings, but maybe that would be the case
Hope this helps
Hi @alefragnani ,
thanks for getting back so quickly. I know little about how VS Code stores data and what kind of data there is. Most other extensions __seem__ to write their settings into the big settings.json, or into files directly in the project folders (like SFTP settings).
I am completely happy with the custom projects.json location setting you're offering. Since I sync my files for my projects anyway, I now have them synced as well. Of course, it would be easier for people to have it synced natively. But anyway, thanks for your extension, it works really beautifully. Especially the wildcard file watching is time-saving. I had been on Atom until recently, where you had to specify files directly to watch. Plus it was quite slower and had no native sync.
Thanks again :)!
Hi @enoversum ,
First of all, thank you for your kind words. I'm glad to know you like the extension 馃榿
The extension's settings, just like other extensions, are stored in User Settings, but the _projects_ are considered _extension's data_, so are stored elsewhere. Since the beginning my intention was to be able to _sync it_ somehow (started with Dropbox, them moved to GitHub repo), so instead of using the extension's data sandbox (which VS Code provides for every extension), I decided to use this User folder, which is mostly a VS Code sandbox location and exits on every VS Code install.
I don't need (personally speaking) any sync feature anymore, but I'm interested on embracing the native Sync on the extension, if possible.
This is the first issue asking about the native Sync feature, but I guess a lot of users could take advantage of this. I'll take a better look on its documentation and open issues, to find out how this could be accomplished.
Hope this helps
Hey @alefragnani ,
from what I gather, it's rather cumbersome to store projects in settings.json, that's for sure, so I hope - if you're as eager as I perceive :) - you'll find a working way to use the native sync functionality of VS Code. I kind of get what you're saying about the sandbox. One thing to keep in mind is that, while having the project list at hand, a user only benefits from synced projects if he somehow also syncs the _actual_ project files and folders - so he has to have some kind of file syncing in place anyway, which could also incorporate the projects.json at a custom location.
For starters, I'd probably edit the documentation and explain shortly that there is no official sync integration, but advise one could set "projectManager.projectsLocation" to where projects themselves are synced.
And don't see my question here as an 'issue' (even though it's listed here as such) - there is no rush, I was just kind of curious if I missed out on official sync capabilities for projects, but your extension works astonishingly well anyway :) !
Hi @enoversum ,
I only found this issue, which _maybe could work_
Instead of saving the projects in projects.json, the extension should use _extension's state_. Doing so, this API would do the trick. The downside is, I guess it could be _wiped out_ if you uninstall the extension, or when some VS Code upgrade occurs (I remember at least one release where this occurred).
Other than that, I see no way to accomplish your request.
And you are right, not only the projects.json should be _synced_ but you _should need have your projects location synchronised too_, which in this case, is not handled by VS Code sync feature.
I'll let you know if I have any news
Hey @alefragnani ,
don't you take this too seriously - I am happily syncing projects with a custom projects.json location now, right were the actual project files are, that way everything for me is working fine. If you're eager to find out if and how you can accomplish projects sync right inside VS Code, you're welcome, but don't see this as a task to be done with high priority for me :) !
Anyway, thanks for your commitment :)!
Hi @enoversum ,
Not eager, just curious to know if it was _doable_, so I could give you proper feedback 馃榿.
Thank you
@alefragnani Being eager and enthusiastic isn't that bad, you know 馃槃 ? Please do let me know in any case 馃槂 !
My 2cent: I've synced settings & projects with https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync without any problem (you just have to add the projects.json to the sync manually).
Currently i also try to use the vscode core sync .. just to have less plugins installed. But yeah.. same problem here.. no projects sync.
@thomasfrobieter ,
Thanks for your 2cents 馃憤
I decided to take a look at Settings Sync extension's documentation/issues, and it appears _it does sync_ the VS Code internal files. That would explain why it does sync projects.json and other related files. You can even see, on its README, the possibility to _ignore_ some files, and use this extension as an exemple.
Most helpful comment
Hi @enoversum ,
First of all, thank you for your kind words. I'm glad to know you like the extension 馃榿
The extension's settings, just like other extensions, are stored in
User Settings, but the _projects_ are considered _extension's data_, so are stored elsewhere. Since the beginning my intention was to be able to _sync it_ somehow (started with Dropbox, them moved to GitHub repo), so instead of using the extension's data sandbox (which VS Code provides for every extension), I decided to use thisUserfolder, which is mostly a VS Code sandbox location and exits on every VS Code install.I don't need (personally speaking) any sync feature anymore, but I'm interested on embracing the native Sync on the extension, if possible.
This is the first issue asking about the native Sync feature, but I guess a lot of users could take advantage of this. I'll take a better look on its documentation and open issues, to find out how this could be accomplished.
Hope this helps