Revert "Add APPLICATION_SHARED storage scope for cross-app state sharing (#311317)"#314034
Open
doraeric wants to merge 1 commit intomicrosoft:mainfrom
Open
Revert "Add APPLICATION_SHARED storage scope for cross-app state sharing (#311317)"#314034doraeric wants to merge 1 commit intomicrosoft:mainfrom
APPLICATION_SHARED storage scope for cross-app state sharing (#311317)"#314034doraeric wants to merge 1 commit intomicrosoft:mainfrom
Conversation
…aring (microsoft#311317)" This reverts commit 717e853.
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @deepak1556Matched files:
|
Author
|
@microsoft-github-policy-service agree |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reverts the previously introduced cross-application storage scope (StorageScope.APPLICATION_SHARED) and its supporting plumbing (shared SQLite DB, IPC change notifications, CLI/config surfaces, and sync wire-format adjustments), restoring the prior single-app storage behavior across workbench, storage, environment, and sync layers.
Changes:
- Removes
StorageScope.APPLICATION_SHAREDfrom the storage service API and implementation layers (browser/electron, main/renderer IPC, and logging/flush paths). - Reverts user data sync and profile storage handling that previously round-tripped a
scopefield for shared storage keys. - Reverts workspace trust and other consumers back to
StorageScope.APPLICATION, and removes--shared-data-dirand related product/environment properties.
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/test/browser/componentFixtures/fixtureUtils.ts | Removes APPLICATION_SHARED storage event typing from test fixture storage service. |
| src/vs/workbench/services/workspaces/test/common/workspaceTrust.test.ts | Reverts test storage writes from APPLICATION_SHARED back to APPLICATION. |
| src/vs/workbench/services/workspaces/common/workspaceTrust.ts | Reverts workspace trust persistence/listeners from APPLICATION_SHARED to APPLICATION. |
| src/vs/workbench/services/storage/electron-browser/storageService.ts | Removes application-shared storage creation/migration logic from native workbench storage service. |
| src/vs/workbench/services/storage/browser/storageService.ts | Removes IndexedDB “global-shared” storage and related wiring. |
| src/vs/workbench/services/environment/browser/environmentService.ts | Removes browser appSharedDataHome property. |
| src/vs/workbench/contrib/notebook/test/browser/notebookKernelHistory.test.ts | Removes APPLICATION_SHARED event typing from notebook kernel history tests. |
| src/vs/workbench/common/memento.ts | Removes application-shared memento cache and related save/reload/clear paths. |
| src/vs/workbench/browser/layout.ts | Removes layout “isNew” tracking for application-shared storage. |
| src/vs/platform/userDataSync/test/common/globalStateSync.test.ts | Updates test expectations to remove persisted scope field in sync payload. |
| src/vs/platform/userDataSync/common/userDataSync.ts | Removes scope?: StorageScope from sync storage value type. |
| src/vs/platform/userDataSync/common/globalStateSync.ts | Reverts global state sync read/write paths to no longer route by storage scope. |
| src/vs/platform/userDataProfile/test/common/userDataProfileStorageService.test.ts | Updates profile storage test expectations to remove scope in returned values. |
| src/vs/platform/userDataProfile/common/userDataProfileStorageService.ts | Reverts profile storage read/write APIs to no longer support APPLICATION_SHARED scope. |
| src/vs/platform/storage/test/electron-main/storageMainService.test.ts | Removes application-shared storage main-process tests and IPC test scaffolding. |
| src/vs/platform/storage/electron-main/storageMainService.ts | Removes application-shared storage main-process service lifecycle and routing. |
| src/vs/platform/storage/electron-main/storageMain.ts | Removes application-shared storage main implementation, host fallback storage, and cross-app IPC wrapper DB. |
| src/vs/platform/storage/electron-main/storageIpc.ts | Removes IPC routing/events for application-shared storage. |
| src/vs/platform/storage/common/storageService.ts | Removes renderer-side application-shared storage client and lifecycle hooks. |
| src/vs/platform/storage/common/storageIpc.ts | Removes IPC request flag and clients for application-shared and fallback application storage items. |
| src/vs/platform/storage/common/storage.ts | Removes StorageScope.APPLICATION_SHARED and associated API surface and log/flush integration. |
| src/vs/platform/environment/node/argv.ts | Removes --shared-data-dir from supported CLI option descriptions. |
| src/vs/platform/environment/common/environmentService.ts | Removes native environment appSharedDataHome resolution logic. |
| src/vs/platform/environment/common/environment.ts | Removes appSharedDataHome from IEnvironmentService. |
| src/vs/platform/environment/common/argv.ts | Removes 'shared-data-dir' from NativeParsedArgs typing. |
| src/vs/editor/standalone/browser/standaloneServices.ts | Removes standalone environment appSharedDataHome property. |
| src/vs/code/node/cli.ts | Removes transient --shared-data-dir generation and relaunch message content. |
| src/vs/base/parts/storage/node/storage.ts | Removes SQLite WAL/busy-timeout options and related PRAGMA configuration. |
| src/vs/base/parts/storage/common/storage.ts | Removes MigratingStorage implementation and related helpers. |
| src/vs/base/common/product.ts | Removes sharedDataFolderName from product configuration interface. |
| product.json | Removes sharedDataFolderName product setting. |
Comment on lines
347
to
351
| ) { | ||
| super(); | ||
|
|
||
| this.whenReady = Promise.all([ | ||
| this.storageMainService.applicationStorage.whenInit, | ||
| this.storageMainService.applicationSharedStorage.whenInit | ||
| ]).then(() => undefined); | ||
| this.whenReady = this.storageMainService.applicationStorage.whenInit; | ||
| } |
Comment on lines
+120
to
121
| const testStorageService = disposables.add(new TestStorageMainService(new NullLogService(), environmentService, disposables.add(new UserDataProfilesMainService(disposables.add(new StateService(SaveStrategy.DELAYED, environmentService, new NullLogService(), fileService)), disposables.add(uriIdentityService), environmentService, fileService, new NullLogService())), lifecycleMainService, fileService, uriIdentityService)); | ||
|
|
Comment on lines
119
to
123
| 'extensions-dir': { type: 'string', deprecates: ['extensionHomePath'], cat: 'e', args: 'dir', description: localize('extensionHomePath', "Set the root path for extensions.") }, | ||
| 'extensions-download-dir': { type: 'string' }, | ||
| 'builtin-extensions-dir': { type: 'string' }, | ||
| 'shared-data-dir': { type: 'string' }, | ||
| 'list-extensions': { type: 'boolean', cat: 'e', description: localize('listExtensions', "List the installed extensions.") }, | ||
| 'agent-plugins-dir': { type: 'string' }, |
Comment on lines
223
to
227
| export const enum StorageScope { | ||
|
|
||
| /** | ||
| * The stored data will be scoped to all workspaces across all profiles | ||
| * and shared across VS Code and Sessions app. | ||
| */ | ||
| APPLICATION_SHARED = -2, | ||
|
|
||
| /** | ||
| * The stored data will be scoped to all workspaces across all profiles. | ||
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Revert "Add
APPLICATION_SHAREDstorage scope for cross-app state sharing (#311317)"This reverts commit 717e853.
Since the issues caused by the original PR remain unresolved and there has been no response to community feedback from @sandy081, I am opening this PR to revert the commit.
If Microsoft is willing to look into this issue, address the community's concerns, or provide a fix for the current problems, please feel free to do so and close this PR.