-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Powertoys Run | VSCodeWorkspaces- add support for vscode 1.64 - bug fix #15247 #15259
Conversation
1a73cb3
to
580d803
Compare
@@ -70,7 +73,7 @@ public List<VSCodeWorkspace> Workspaces | |||
{ | |||
VSCodeStorageFile vscodeStorageFile = JsonSerializer.Deserialize<VSCodeStorageFile>(fileContent); | |||
|
|||
if (vscodeStorageFile != null) | |||
if (vscodeStorageFile != null && vscodeStorageFile.OpenedPathsList != null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When VS Code v1.64 is out and installed locally (updated current version) this file will still exist & contain OpenedPathsList
? In that case new workspaces stored in new file won't be picked up?
Also, on VS Code update, will workspaces from old storage.json file be copied to new file or not ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the storage.json file will exist but the OpenedPathsList will not.
When vscode updates the workspaces from the storage.json will be moved to Backup/workspaces.json by vscode as far as i know.
@jaimecbernardo So a merge blocking bug was found here. So I guess we will release this not with 0.53 right? |
Yes, guess this will be targeted at 0.55. |
@check-spelling-bot Report🔴 Please reviewSee the files view or the action log for details. Unrecognized words (3)datareader Previously acknowledged words that are now absentChaseKnowlden CleanCodeDeveloper CTLCOLORSTATIC Deuchert efgh errc Grayscale iccex ICONINFORMATION INITCOMMONCONTROLSEX INSTALLLOGATTRIBUTES INSTALLLOGMODE INSTALLUILEVEL MAINICON MAKELPARAM msiexec MSIINSTALLER NATIVEFNTCTL netlify Qin rdeveen rexit SETRANGE SETSTEP sregex STEPIT symlink UITo We'dTo accept these unrecognized words as correct (and remove the previously acknowledged and now absent words), run the following commands... in a clone of the git@github.com:ricardosantos9521/PowerToys.git repository
|
I think i fixed the issue. I'm obtaining the previous opened workspaces from AppData\Roaming\Code - Insiders\User\globalStorage\state.vscdb a sqlite db. I added the package Microsoft.Data.Sqlite do i need to add it somewhere else? |
864d525
to
1348966
Compare
yes, installer should probably be updated. Let me check |
yes, check this line https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs#L1333 Before modifying installer, try building the PowerToys installer like this (in developer CMD for Visual Studio) and install PT:
My guess is that when you try to test VSCodeWorkspaces plugin - part with reading the database, it will crash. |
@stefansjfw the installer is working now |
Hi @ricardosantos9521, |
9da46fe
to
d3d2a35
Compare
done |
@@ -106,6 +110,50 @@ public List<VSCodeWorkspace> Workspaces | |||
} | |||
} | |||
} | |||
else if (File.Exists(vscode_storage_db)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be inside if (File.Exists(vscode_storage))
. Does db logic depend on existence of vscode_storage
file? I.e. can we still read workspaces from DB if there is no vscode_storage
file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we can't read workspaces if there's no vscode_storage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than that one question I wrote, looks good! Nice work!
Summary of the Pull Request
What is this about:
VSCode insiders 1.64 has a new file for workspaces. This is pull request is to add support to the new file.
What is included in the PR:
Use the new file Backups/workspaces.json instead of storage.json
How does someone test / validate:
Quality Checklist
Contributor License Agreement (CLA)
A CLA must be signed. If not, go over here and sign the CLA.