-
Notifications
You must be signed in to change notification settings - Fork 29.3k
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
Feature request: Setting to change workspaceStorage location #22557
Comments
IMO we should not hide this behind a general workspace storage settings since it sounds more like a workspace & extension specific setting. I can imagine that workspace A stores this metadata on drive X: where as workspace B stores the metadata on drive Y:. |
@dbaeumer I think having a general workspace storage setting would be invaluable, I want to be able to choose what the default location where my information is stored. My roaming profile has a hard limit on the amount of data I can store and I don't want to use it as a workspace storage area. |
This seems like an edge case that may only affect the C++ extension and very few others, with the obvious workaround of storing somewhere owned by the extension. @mguptawork related to roaming: #3884 |
Sure, that's fine. I assumed other extensions existed that used large amounts of storage, but if that's not the case, it's easy for us to add the setting to our extension. |
@Tyriar I would like the ability to store my data somewhere other than the default AppData\Roaming\Code\User\workspaceStorage, it's not just extensions, this is the location for all cached data for VS code. The area keeps getting filled and I keep having to delete data. This would be a very valuable option for me and I'm sure for a lot of other users. Further considering VS code rightfully prides itself on being easily configurable by updating a simple JSON. It seems to be an unusual oversight that we cannot configure the location of the workspaceStorage. |
@mguptawork easily configurable and at the same time not bloated by overly specific settings with very few use cases. Why not just store the large files in some json file defined in an extension setting? You could also run the client and specify your user data dir on the other drive as another workaround. |
cpptools has the databaseFilename setting for changing the location from the workspaceStorage, but it's per-workspace with no per-user option yet. It looks like |
@Tyriar I don't see this as an overly specific setting, having an option to select the location of my "general" workspace seems to be a pretty general configuration. As I commented earlier, this is not a problem I'm facing just because of one extension. In fact as @sean-mcmanus has pointed out, cpptools does have an option to change the cache location, which I'm already using. But the general workspace is used to store vscode's caches, it's used to store code's updates and so on. It's a data hog and I have no control where that data hogging happens. Having an option to specify that directory would be really valuable. |
@mguptawork Changing your shortcut to run |
@mguptawork I think the real fix here is for ensuring only lightweight files get put in roaming as part of #3884 (comment). In the proposal I made on that issue |
@sean-mcmanus @Tyriar oh I did not realize your suggestion meant we can give a user-data-dir option. That is indeed a good workaround for windows. I also think the option to put workspaceStorage files in local instead of roaming is a step in the right direction. Infact it makes even more sense this be configurable via the settings json given the option exists to configure it via switches. After all the settings json captures the "permanent" state you would like your editor to be in. If everytime you want to bring your editor with a certain setting, it makes sense for that setting to belong in a config file. The switches should be used to override your default custom config. |
It cannot be included in settings.json as that's loaded too late in the process for various reasons (performance is a big one). This is the reason a locale.json was added just for the language; so we didn't need to block initialization in order to parse a potentially large or malformed json file. |
@Tyriar I see what you mean, I had a look at main.js and you are using locale.json and user-data-dir around the same time. I have a compromise suggestion then. Perhaps a person could configure what they would like their workspaceStorage location to be during installation time, having perhaps three options two defaults and a custom one. The Roaming folder, the installation folder or a custom folder That information could be stored in the locale.json. If they want to change it after installation. It's on them. They can copy it and change the path manually. In a later release perhaps the option to change it automatically can be given via a small function, accessible from the command menu. What do you think? |
Hi All, are we good with going forward with the suggestion I mentioned above? |
Just checking the status of this one. I've been struggling with limited HD storage and I just realized that CPP Tools from VSCode had eaten a lot of GBs. Being able to manage where the cache is and clear it would be good. |
@thomthom The cpptools team hasn't done any changes for this. You can set the browse.databaseFilename for projects, change your shortcut to run |
This iteration we focus on issue grooming. This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider. If you wonder what we are up to, please see our roadmap and issue reporting guidelines. Thanks for your understanding and happy coding! |
Just curious why not save the workspaceStorage data just under .vscode directory in each workspace folder? Easy to find and delete to entirely reset the workspace. It's much cleaner to me. |
@sun-xm That was the default originally for our C/C++ extension (and the same as the VS default in their .vs folder), but we got lots of users complaining about the large database file being added to their workspace so we moved it. Setting your C_Cpp.default.browse.databaseFilename to "${workspaceFolder}/.vscode/vc.db" is the workaround for our extension. |
Sounds good. Thanks very much for the explanation @sean-mcmanus |
Our C++ extension can generate several GB of per-workspace data (and theoretically so could other extensions). We want some sort of workspaceStorage setting so users can change the location to a drive with more storage space. The default on Windows is AppData\Roaming\Code\User\workspaceStorage. Our extension could provide this setting ourselves, but it seems like it should belong to VS code so that everyone using the workspaceStorage can benefit.
The text was updated successfully, but these errors were encountered: