Browse Source

feat: disable broken features (#2562)

Baptiste Augrain 2 days ago
parent
commit
59e21c9cc6
2 changed files with 215 additions and 0 deletions
  1. 30 0
      patches/disable-settingssync-logger.patch
  2. 185 0
      patches/disable-vscodedev.patch

+ 30 - 0
patches/disable-settingssync-logger.patch

@@ -0,0 +1,30 @@
+diff --git a/src/vs/code/electron-utility/sharedProcess/sharedProcessMain.ts b/src/vs/code/electron-utility/sharedProcess/sharedProcessMain.ts
+index 89d9736..b2a1623 100644
+--- a/src/vs/code/electron-utility/sharedProcess/sharedProcessMain.ts
++++ b/src/vs/code/electron-utility/sharedProcess/sharedProcessMain.ts
+@@ -61,3 +61,3 @@ import { ExtensionStorageService, IExtensionStorageService } from '../../../plat
+ import { IgnoredExtensionsManagementService, IIgnoredExtensionsManagementService } from '../../../platform/userDataSync/common/ignoredExtensions.js';
+-import { IUserDataSyncLocalStoreService, IUserDataSyncLogService, IUserDataSyncEnablementService, IUserDataSyncService, IUserDataSyncStoreManagementService, IUserDataSyncStoreService, IUserDataSyncUtilService, registerConfiguration as registerUserDataSyncConfiguration, IUserDataSyncResourceProviderService } from '../../../platform/userDataSync/common/userDataSync.js';
++import { IUserDataSyncLocalStoreService, IUserDataSyncEnablementService, IUserDataSyncService, IUserDataSyncStoreManagementService, IUserDataSyncStoreService, IUserDataSyncUtilService, registerConfiguration as registerUserDataSyncConfiguration, IUserDataSyncResourceProviderService } from '../../../platform/userDataSync/common/userDataSync.js';
+ import { IUserDataSyncAccountService, UserDataSyncAccountService } from '../../../platform/userDataSync/common/userDataSyncAccount.js';
+@@ -65,3 +65,2 @@ import { UserDataSyncLocalStoreService } from '../../../platform/userDataSync/co
+ import { UserDataSyncAccountServiceChannel, UserDataSyncStoreManagementServiceChannel } from '../../../platform/userDataSync/common/userDataSyncIpc.js';
+-import { UserDataSyncLogService } from '../../../platform/userDataSync/common/userDataSyncLog.js';
+ import { IUserDataSyncMachinesService, UserDataSyncMachinesService } from '../../../platform/userDataSync/common/userDataSyncMachines.js';
+@@ -366,3 +365,2 @@ class SharedProcessMain extends Disposable implements IClientConnectionFilter {
+ 		services.set(IUserDataSyncAccountService, new SyncDescriptor(UserDataSyncAccountService, undefined, true));
+-		services.set(IUserDataSyncLogService, new SyncDescriptor(UserDataSyncLogService, undefined, true));
+ 		services.set(IUserDataSyncUtilService, ProxyChannel.toService(this.server.getChannel('userDataSyncUtil', client => client.ctx !== 'main')));
+diff --git a/src/vs/workbench/workbench.common.main.ts b/src/vs/workbench/workbench.common.main.ts
+index 61d63db..ccd7ff7 100644
+--- a/src/vs/workbench/workbench.common.main.ts
++++ b/src/vs/workbench/workbench.common.main.ts
+@@ -157,4 +157,2 @@ import { IgnoredExtensionsManagementService, IIgnoredExtensionsManagementService
+ import { ExtensionStorageService, IExtensionStorageService } from '../platform/extensionManagement/common/extensionStorage.js';
+-import { IUserDataSyncLogService } from '../platform/userDataSync/common/userDataSync.js';
+-import { UserDataSyncLogService } from '../platform/userDataSync/common/userDataSyncLog.js';
+ import { AllowedExtensionsService } from '../platform/extensionManagement/common/allowedExtensionsService.js';
+@@ -164,3 +162,2 @@ import { AllowedMcpServersService } from '../platform/mcp/common/allowedMcpServe
+ 
+-registerSingleton(IUserDataSyncLogService, UserDataSyncLogService, InstantiationType.Delayed);
+ registerSingleton(IAllowedExtensionsService, AllowedExtensionsService, InstantiationType.Delayed);

+ 185 - 0
patches/disable-vscodedev.patch

@@ -0,0 +1,185 @@
+diff --git a/extensions/github/package.json b/extensions/github/package.json
+index 726a882..b9a4969 100644
+--- a/extensions/github/package.json
++++ b/extensions/github/package.json
+@@ -44,19 +44,2 @@
+       },
+-      {
+-        "command": "github.copyVscodeDevLink",
+-        "title": "%command.copyVscodeDevLink%"
+-      },
+-      {
+-        "command": "github.copyVscodeDevLinkFile",
+-        "title": "%command.copyVscodeDevLink%"
+-      },
+-      {
+-        "command": "github.copyVscodeDevLinkWithoutRange",
+-        "title": "%command.copyVscodeDevLink%"
+-      },
+-      {
+-        "command": "github.openOnVscodeDev",
+-        "title": "%command.openOnVscodeDev%",
+-        "icon": "$(globe)"
+-      },
+       {
+@@ -72,11 +55,2 @@
+     ],
+-    "continueEditSession": [
+-      {
+-        "command": "github.openOnVscodeDev",
+-        "when": "github.hasGitHubRepo",
+-        "qualifiedName": "Continue Working in vscode.dev",
+-        "category": "Remote Repositories",
+-        "remoteGroup": "virtualfs_44_vscode-vfs_2_web@2"
+-      }
+-    ],
+     "menus": {
+@@ -91,18 +65,2 @@
+         },
+-        {
+-          "command": "github.copyVscodeDevLink",
+-          "when": "false"
+-        },
+-        {
+-          "command": "github.copyVscodeDevLinkFile",
+-          "when": "false"
+-        },
+-        {
+-          "command": "github.copyVscodeDevLinkWithoutRange",
+-          "when": "false"
+-        },
+-        {
+-          "command": "github.openOnVscodeDev",
+-          "when": "false"
+-        },
+         {
+@@ -112,42 +70,2 @@
+       ],
+-      "file/share": [
+-        {
+-          "command": "github.copyVscodeDevLinkFile",
+-          "when": "github.hasGitHubRepo && remoteName != 'codespaces'",
+-          "group": "0_vscode@0"
+-        }
+-      ],
+-      "editor/context/share": [
+-        {
+-          "command": "github.copyVscodeDevLink",
+-          "when": "github.hasGitHubRepo && resourceScheme != untitled && !isInEmbeddedEditor && remoteName != 'codespaces'",
+-          "group": "0_vscode@0"
+-        }
+-      ],
+-      "explorer/context/share": [
+-        {
+-          "command": "github.copyVscodeDevLinkWithoutRange",
+-          "when": "github.hasGitHubRepo && resourceScheme != untitled && !isInEmbeddedEditor && remoteName != 'codespaces'",
+-          "group": "0_vscode@0"
+-        }
+-      ],
+-      "editor/lineNumber/context": [
+-        {
+-          "command": "github.copyVscodeDevLink",
+-          "when": "github.hasGitHubRepo && resourceScheme != untitled && activeEditor == workbench.editors.files.textFileEditor && config.editor.lineNumbers == on && remoteName != 'codespaces'",
+-          "group": "1_cutcopypaste@2"
+-        },
+-        {
+-          "command": "github.copyVscodeDevLink",
+-          "when": "github.hasGitHubRepo && resourceScheme != untitled && activeEditor == workbench.editor.notebook && remoteName != 'codespaces'",
+-          "group": "1_cutcopypaste@2"
+-        }
+-      ],
+-      "editor/title/context/share": [
+-        {
+-          "command": "github.copyVscodeDevLinkWithoutRange",
+-          "when": "github.hasGitHubRepo && resourceScheme != untitled && remoteName != 'codespaces'",
+-          "group": "0_vscode@0"
+-        }
+-      ],
+       "scm/historyItem/context": [
+diff --git a/extensions/github/src/commands.ts b/extensions/github/src/commands.ts
+index 48e9574..aa853a5 100644
+--- a/extensions/github/src/commands.ts
++++ b/extensions/github/src/commands.ts
+@@ -9,28 +9,3 @@ import { publishRepository } from './publish.js';
+ import { DisposableStore, getRepositoryFromUrl } from './util.js';
+-import { LinkContext, getCommitLink, getLink, getVscodeDevHost } from './links.js';
+-
+-async function copyVscodeDevLink(gitAPI: GitAPI, useSelection: boolean, context: LinkContext, includeRange = true) {
+-	try {
+-		const permalink = await getLink(gitAPI, useSelection, true, getVscodeDevHost(), 'headlink', context, includeRange);
+-		if (permalink) {
+-			return vscode.env.clipboard.writeText(permalink);
+-		}
+-	} catch (err) {
+-		if (!(err instanceof vscode.CancellationError)) {
+-			vscode.window.showErrorMessage(err.message);
+-		}
+-	}
+-}
+-
+-async function openVscodeDevLink(gitAPI: GitAPI): Promise<vscode.Uri | undefined> {
+-	try {
+-		const headlink = await getLink(gitAPI, true, false, getVscodeDevHost(), 'headlink');
+-		return headlink ? vscode.Uri.parse(headlink) : undefined;
+-	} catch (err) {
+-		if (!(err instanceof vscode.CancellationError)) {
+-			vscode.window.showErrorMessage(err.message);
+-		}
+-		return undefined;
+-	}
+-}
++import {  getCommitLink } from './links.js';
+ 
+@@ -70,14 +45,2 @@ export function registerCommands(gitAPI: GitAPI): vscode.Disposable {
+ 
+-	disposables.add(vscode.commands.registerCommand('github.copyVscodeDevLink', async (context: LinkContext) => {
+-		return copyVscodeDevLink(gitAPI, true, context);
+-	}));
+-
+-	disposables.add(vscode.commands.registerCommand('github.copyVscodeDevLinkFile', async (context: LinkContext) => {
+-		return copyVscodeDevLink(gitAPI, false, context);
+-	}));
+-
+-	disposables.add(vscode.commands.registerCommand('github.copyVscodeDevLinkWithoutRange', async (context: LinkContext) => {
+-		return copyVscodeDevLink(gitAPI, true, context, false);
+-	}));
+-
+ 	disposables.add(vscode.commands.registerCommand('github.openOnGitHub', async (url: string, historyItemId: string) => {
+@@ -113,6 +76,2 @@ export function registerCommands(gitAPI: GitAPI): vscode.Disposable {
+ 
+-	disposables.add(vscode.commands.registerCommand('github.openOnVscodeDev', async () => {
+-		return openVscodeDevLink(gitAPI);
+-	}));
+-
+ 	return disposables;
+diff --git a/extensions/github/src/extension.ts b/extensions/github/src/extension.ts
+index 17906c5..86a0ca8 100644
+--- a/extensions/github/src/extension.ts
++++ b/extensions/github/src/extension.ts
+@@ -17,3 +17,2 @@ import { GitHubBranchProtectionProviderManager } from './branchProtection.js';
+ import { GitHubCanonicalUriProvider } from './canonicalUriProvider.js';
+-import { VscodeDevShareProvider } from './shareProviders.js';
+ import { GitHubSourceControlHistoryItemDetailsProvider } from './historyItemDetailsProvider.js';
+@@ -109,3 +108,2 @@ function initializeGitExtension(context: ExtensionContext, octokitService: Octok
+ 						disposables.add(new GitHubCanonicalUriProvider(gitAPI));
+-						disposables.add(new VscodeDevShareProvider(gitAPI));
+ 						setGitHubContext(gitAPI, disposables);
+diff --git a/extensions/github/src/remoteSourceProvider.ts b/extensions/github/src/remoteSourceProvider.ts
+index 291a3f1..6304ed8 100644
+--- a/extensions/github/src/remoteSourceProvider.ts
++++ b/extensions/github/src/remoteSourceProvider.ts
+@@ -10,3 +10,3 @@ import { Octokit } from '@octokit/rest';
+ import { getRepositoryFromQuery, getRepositoryFromUrl } from './util.js';
+-import { getBranchLink, getVscodeDevHost } from './links.js';
++import { getBranchLink } from './links.js';
+ 
+@@ -129,9 +129,2 @@ export class GithubRemoteSourceProvider implements RemoteSourceProvider {
+ 			}
+-		}, {
+-			label: l10n.t('Checkout on vscode.dev'),
+-			icon: 'globe',
+-			run(branch: string) {
+-				const link = getBranchLink(url, branch, getVscodeDevHost());
+-				env.openExternal(Uri.parse(link));
+-			}
+ 		}];