chore: update code to 1.71.2 (#5580)

* chore: update code to 1.71.2

* chore: update telemetry patch

It appears part of the fix has been implemented upstream.

* refactor: drop safari-console patch

This has been fixed upstream.
This commit is contained in:
Joe Previte 2022-09-23 15:51:41 -07:00 committed by GitHub
parent fdec34cf85
commit 3256157a3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 94 deletions

View File

@ -79,7 +79,10 @@ main() {
"newsletterSignupUrl": "https://www.research.net/r/vsc-newsletter", "newsletterSignupUrl": "https://www.research.net/r/vsc-newsletter",
"linkProtectionTrustedDomains": [ "linkProtectionTrustedDomains": [
"https://open-vsx.org" "https://open-vsx.org"
] ],
"aiConfig": {
"ariaKey": "code-server"
}
} }
EOF EOF
) > product.json ) > product.json

@ -1 +1 @@
Subproject commit a44493aed3c9ccdec18a4bc00869403736b29c64 Subproject commit 74b1f979648cc44d385a2286793c226e611f59e7

View File

@ -1,13 +0,0 @@
Index: code-server/lib/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts
+++ code-server/lib/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts
@@ -286,7 +286,7 @@ export class XtermTerminal extends Dispo
}
private _shouldLoadCanvas(): boolean {
- return (this._configHelper.config.gpuAcceleration === 'auto' && (XtermTerminal._suggestedRendererType === undefined || XtermTerminal._suggestedRendererType === 'canvas')) || this._configHelper.config.gpuAcceleration === 'canvas';
+ return !isSafari && (this._configHelper.config.gpuAcceleration === 'auto' && (XtermTerminal._suggestedRendererType === undefined || XtermTerminal._suggestedRendererType === 'canvas')) || this._configHelper.config.gpuAcceleration === 'canvas';
}
forceRedraw() {

View File

@ -20,4 +20,3 @@ telemetry.diff
display-language.diff display-language.diff
cli-window-open.diff cli-window-open.diff
exec-argv.diff exec-argv.diff
safari-console.diff

View File

@ -1,7 +1,5 @@
Add support for telemetry endpoint Add support for telemetry endpoint
Contains some fixes included in https://github.com/microsoft/vscode/commit/b108bc8294ce920fcf2ee8d53f97c3bcf3316e1c
To test: To test:
1. Look inside a build of code-server, inside `lib/vscode/vs/server/node/server.main.js` 1. Look inside a build of code-server, inside `lib/vscode/vs/server/node/server.main.js`
2. Search for a `JSON.stringify` near `TelemetryClient` 2. Search for a `JSON.stringify` near `TelemetryClient`
@ -89,82 +87,6 @@ Index: code-server/lib/vscode/src/vs/server/node/telemetryClient.ts
+ } catch (error) {} + } catch (error) {}
+ } + }
+} +}
Index: code-server/lib/vscode/src/vs/workbench/services/telemetry/browser/telemetryService.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/services/telemetry/browser/telemetryService.ts
+++ code-server/lib/vscode/src/vs/workbench/services/telemetry/browser/telemetryService.ts
@@ -15,7 +15,7 @@ import { ClassifiedEvent, IGDPRProperty,
import { ITelemetryData, ITelemetryInfo, ITelemetryService, TelemetryLevel, TELEMETRY_SETTING_ID } from 'vs/platform/telemetry/common/telemetry';
import { TelemetryLogAppender } from 'vs/platform/telemetry/common/telemetryLogAppender';
import { ITelemetryServiceConfig, TelemetryService as BaseTelemetryService } from 'vs/platform/telemetry/common/telemetryService';
-import { isInternalTelemetry, ITelemetryAppender, NullTelemetryService, supportsTelemetry } from 'vs/platform/telemetry/common/telemetryUtils';
+import { getTelemetryLevel, isInternalTelemetry, ITelemetryAppender, NullTelemetryService, supportsTelemetry } from 'vs/platform/telemetry/common/telemetryUtils';
import { IBrowserWorkbenchEnvironmentService } from 'vs/workbench/services/environment/browser/environmentService';
import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService';
import { resolveWorkbenchCommonProperties } from 'vs/workbench/services/telemetry/browser/workbenchCommonProperties';
@@ -24,7 +24,7 @@ export class TelemetryService extends Di
declare readonly _serviceBrand: undefined;
- private impl: ITelemetryService;
+ private impl: ITelemetryService = NullTelemetryService;
public readonly sendErrorTelemetry = true;
constructor(
@@ -37,11 +37,7 @@ export class TelemetryService extends Di
) {
super();
- if (supportsTelemetry(productService, environmentService) && productService.aiConfig?.ariaKey) {
- this.impl = this.initializeService(environmentService, loggerService, configurationService, storageService, productService, remoteAgentService);
- } else {
- this.impl = NullTelemetryService;
- }
+ this.impl = this.initializeService(environmentService, loggerService, configurationService, storageService, productService, remoteAgentService);
// When the level changes it could change from off to on and we want to make sure telemetry is properly intialized
this._register(configurationService.onDidChangeConfiguration(e => {
@@ -64,23 +60,28 @@ export class TelemetryService extends Di
productService: IProductService,
remoteAgentService: IRemoteAgentService
) {
- const telemetrySupported = supportsTelemetry(productService, environmentService) && productService.aiConfig?.ariaKey;
- if (telemetrySupported && this.impl === NullTelemetryService && this.telemetryLevel.value !== TelemetryLevel.NONE) {
+ const telemetrySupported = supportsTelemetry(productService, environmentService);
+ if (telemetrySupported && getTelemetryLevel(configurationService) !== TelemetryLevel.NONE && this.impl === NullTelemetryService) {
// If remote server is present send telemetry through that, else use the client side appender
const appenders = [];
const isInternal = isInternalTelemetry(productService, configurationService);
- const telemetryProvider: ITelemetryAppender = remoteAgentService.getConnection() !== null ? { log: remoteAgentService.logTelemetry.bind(remoteAgentService), flush: remoteAgentService.flushTelemetry.bind(remoteAgentService) } : new OneDataSystemWebAppender(isInternal, 'monacoworkbench', null, productService.aiConfig?.ariaKey);
- appenders.push(telemetryProvider);
- appenders.push(new TelemetryLogAppender(loggerService, environmentService));
- const config: ITelemetryServiceConfig = {
- appenders,
- commonProperties: resolveWorkbenchCommonProperties(storageService, productService.commit, productService.version, isInternal, environmentService.remoteAuthority, productService.embedderIdentifier, productService.removeTelemetryMachineId, environmentService.options && environmentService.options.resolveCommonTelemetryProperties),
- sendErrorTelemetry: this.sendErrorTelemetry,
- };
+ const telemetryProvider: ITelemetryAppender | undefined = remoteAgentService.getConnection() !== null ? { log: remoteAgentService.logTelemetry.bind(remoteAgentService), flush: remoteAgentService.flushTelemetry.bind(remoteAgentService) } : productService.aiConfig?.ariaKey ? new OneDataSystemWebAppender(isInternal, 'monacoworkbench', null, productService.aiConfig?.ariaKey) : undefined;
+ if (telemetryProvider) {
+ appenders.push(telemetryProvider);
+ appenders.push(new TelemetryLogAppender(loggerService, environmentService));
+ const config: ITelemetryServiceConfig = {
+ appenders,
+ commonProperties: resolveWorkbenchCommonProperties(storageService, productService.commit, productService.version, isInternal, environmentService.remoteAuthority, productService.embedderIdentifier, productService.removeTelemetryMachineId, environmentService.options && environmentService.options.resolveCommonTelemetryProperties),
+ sendErrorTelemetry: this.sendErrorTelemetry,
+ };
+
+ return this._register(new BaseTelemetryService(config, configurationService, productService));
+ } else {
+ return this.impl;
+ }
- return this._register(new BaseTelemetryService(config, configurationService, productService));
}
- return NullTelemetryService;
+ return this.impl;
}
setExperimentProperty(name: string, value: string): void {
Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
=================================================================== ===================================================================
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts