From 5e67f5e869f4944c2a142d225ef0d32542c555e4 Mon Sep 17 00:00:00 2001 From: John Date: Sat, 28 Aug 2021 12:43:48 +0200 Subject: [PATCH] vscode: use electron13 --- .../patches/disable-crash-reporter.patch | 71 +++++++++++++++++++ srcpkgs/vscode/template | 8 +-- 2 files changed, 75 insertions(+), 4 deletions(-) create mode 100644 srcpkgs/vscode/patches/disable-crash-reporter.patch diff --git a/srcpkgs/vscode/patches/disable-crash-reporter.patch b/srcpkgs/vscode/patches/disable-crash-reporter.patch new file mode 100644 index 00000000000..59553fabf75 --- /dev/null +++ b/srcpkgs/vscode/patches/disable-crash-reporter.patch @@ -0,0 +1,71 @@ +From afa206dc466066c3d273dfc879103700505b3d7b Mon Sep 17 00:00:00 2001 +From: Joshua Strobl +Date: Sun, 22 Aug 2021 14:02:05 +0300 +Subject: [PATCH 1/1] Disable crash reporter since Microsoft refuses to fix + this upstream. + +Unfortunately a PR submitted by a third-party was rejected by Microsoft, which would change the default for crash reporting from true to false and move the telemetry configuration to ensure crash reporting was not being forced on, placed in the argv.json, and cause a crash when improperly set. + +So, disable it entirely. No cookies for you, Visual Studio Code team. +--- + src/bootstrap-fork.js | 3 --- + src/main.js | 16 ---------------- + src/vs/code/electron-main/app.ts | 2 +- + 3 files changed, 1 insertion(+), 20 deletions(-) + +diff --git a/src/bootstrap-fork.js b/src/bootstrap-fork.js +index 55303d9a556..ead5d08663f 100644 +--- a/src/bootstrap-fork.js ++++ b/src/bootstrap-fork.js +@@ -37,9 +37,6 @@ if (process.env['VSCODE_PARENT_PID']) { + terminateWhenParentTerminates(); + } + +-// Configure Crash Reporter +-configureCrashReporter(); +- + // Load AMD entry point + require('./bootstrap-amd').load(process.env['VSCODE_AMD_ENTRYPOINT']); + +diff --git a/src/main.js b/src/main.js +index 9cf737e0649..1d779632498 100644 +--- a/src/main.js ++++ b/src/main.js +@@ -46,22 +46,6 @@ const codeCachePath = getCodeCachePath(); + // Configure static command line arguments + const argvConfig = configureCommandlineSwitchesSync(args); + +-// Configure crash reporter +-perf.mark('code/willStartCrashReporter'); +-// If a crash-reporter-directory is specified we store the crash reports +-// in the specified directory and don't upload them to the crash server. +-// +-// Appcenter crash reporting is enabled if +-// * enable-crash-reporter runtime argument is set to 'true' +-// * --disable-crash-reporter command line parameter is not set +-// +-// Disable crash reporting in all other cases. +-if (args['crash-reporter-directory'] || +- (argvConfig['enable-crash-reporter'] && !args['disable-crash-reporter'])) { +- configureCrashReporter(); +-} +-perf.mark('code/didStartCrashReporter'); +- + // Set logs path before app 'ready' event if running portable + // to ensure that no 'logs' folder is created on disk at a + // location outside of the portable directory +diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts +index 135f444bdbf..9d207a91bcf 100644 +--- a/src/vs/code/electron-main/app.ts ++++ b/src/vs/code/electron-main/app.ts +@@ -982,7 +982,7 @@ export class CodeApplication extends Disposable { + const argvJSON = JSON.parse(stripComments(argvString)); + if (argvJSON['enable-crash-reporter'] === undefined) { + const enableCrashReporterSetting = this.configurationService.getValue('telemetry.enableCrashReporter'); +- const enableCrashReporter = typeof enableCrashReporterSetting === 'boolean' ? enableCrashReporterSetting : true; ++ const enableCrashReporter = typeof enableCrashReporterSetting === 'boolean' ? enableCrashReporterSetting : false; + const additionalArgvContent = [ + '', + ' // Allows to disable crash reporting.', +-- +2.32.0 diff --git a/srcpkgs/vscode/template b/srcpkgs/vscode/template index da7d5cbe5bc..4a141543c9c 100644 --- a/srcpkgs/vscode/template +++ b/srcpkgs/vscode/template @@ -1,11 +1,11 @@ # Template file for 'vscode' pkgname=vscode version=1.59.1 -revision=2 -_electronver=12.0.14 +revision=3 +_electronver=13.2.2 hostmakedepends="pkg-config python nodejs yarn tar git" -makedepends="libxkbfile-devel libsecret-devel electron12" -depends="libXtst libxkbfile nss dejavu-fonts-ttf xdg-utils ripgrep electron12" +makedepends="libxkbfile-devel libsecret-devel electron13" +depends="libXtst libxkbfile nss dejavu-fonts-ttf xdg-utils ripgrep electron13" short_desc="Microsoft Code for Linux" maintainer="shizonic " license="MIT"