diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js index 2a0c236eaf0..60bd3f24361 100644 --- a/build/gulpfile.reh.js +++ b/build/gulpfile.reh.js @@ -309,8 +309,6 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa .pipe(replace('@@COMMIT@@', commit)) .pipe(replace('@@APPNAME@@', product.applicationName)) .pipe(rename(`bin/helpers/browser.cmd`)), - gulp.src('resources/server/bin/server-old.cmd', { base: '.' }) - .pipe(rename(`server.cmd`)), gulp.src('resources/server/bin/code-server.cmd', { base: '.' }) .pipe(rename(`bin/${product.serverApplicationName}.cmd`)), ); @@ -332,13 +330,6 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa .pipe(rename(`bin/${product.serverApplicationName}`)) .pipe(util.setExecutableBit()) ); - if (type !== 'reh-web') { - result = es.merge(result, - gulp.src('resources/server/bin/server-old.sh', { base: '.' }) - .pipe(rename(`server.sh`)) - .pipe(util.setExecutableBit()), - ); - } } return result.pipe(vfs.dest(destination)); diff --git a/resources/server/bin/server-old.cmd b/resources/server/bin/server-old.cmd deleted file mode 100644 index 3b459b30d37..00000000000 --- a/resources/server/bin/server-old.cmd +++ /dev/null @@ -1,24 +0,0 @@ -@echo off -setlocal - -set ROOT_DIR=%~dp0 - -set _FIRST_ARG=%1 -if "%_FIRST_ARG:~0,9%"=="--inspect" ( - set INSPECT=%1 - shift -) else ( - set INSPECT= -) - -:loop1 -if "%~1"=="" goto after_loop -set RESTVAR=%RESTVAR% %1 -shift -goto loop1 - -:after_loop - -"%ROOT_DIR%node.exe" %INSPECT% "%ROOT_DIR%out\server-main.js" --compatibility=1.63 %RESTVAR% - -endlocal diff --git a/resources/server/bin/server-old.sh b/resources/server/bin/server-old.sh deleted file mode 100644 index 7861d790be3..00000000000 --- a/resources/server/bin/server-old.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env sh -# -# Copyright (c) Microsoft Corporation. All rights reserved. -# - -case "$1" in - --inspect*) INSPECT="$1"; shift;; -esac - -ROOT="$(dirname "$0")" - -"$ROOT/node" ${INSPECT:-} "$ROOT/out/server-main.js" --compatibility=1.63 "$@" diff --git a/src/server-main.js b/src/server-main.js index 360c74aa858..5167527baed 100644 --- a/src/server-main.js +++ b/src/server-main.js @@ -45,12 +45,6 @@ async function start() { return; } - if (parsedArgs['compatibility'] === '1.63') { - console.warn(`server.sh is being replaced by 'bin/${product.serverApplicationName}'. Please migrate to the new command and adopt the following new default behaviors:`); - console.warn('* connection token is mandatory unless --without-connection-token is used'); - console.warn('* host defaults to `localhost`'); - } - /** * @typedef { import('./vs/server/node/remoteExtensionHostAgentServer').IServerAPI } IServerAPI */ diff --git a/src/vs/server/node/serverConnectionToken.ts b/src/vs/server/node/serverConnectionToken.ts index 1868647c790..f976d0e379a 100644 --- a/src/vs/server/node/serverConnectionToken.ts +++ b/src/vs/server/node/serverConnectionToken.ts @@ -29,17 +29,6 @@ export class NoneServerConnectionToken { } } -export class OptionalServerConnectionToken { - public readonly type = ServerConnectionTokenType.Optional; - - constructor(public readonly value: string) { - } - - public validate(connectionToken: any): boolean { - return (connectionToken === this.value); - } -} - export class MandatoryServerConnectionToken { public readonly type = ServerConnectionTokenType.Mandatory; @@ -51,7 +40,7 @@ export class MandatoryServerConnectionToken { } } -export type ServerConnectionToken = NoneServerConnectionToken | OptionalServerConnectionToken | MandatoryServerConnectionToken; +export type ServerConnectionToken = NoneServerConnectionToken | MandatoryServerConnectionToken; export class ServerConnectionTokenParseError { constructor( @@ -63,7 +52,6 @@ export async function parseServerConnectionToken(args: ServerParsedArgs, default const withoutConnectionToken = args['without-connection-token']; const connectionToken = args['connection-token']; const connectionTokenFile = args['connection-token-file']; - const compatibility = (args['compatibility'] === '1.63'); if (withoutConnectionToken) { if (typeof connectionToken !== 'undefined' || typeof connectionTokenFile !== 'undefined') { @@ -96,20 +84,9 @@ export async function parseServerConnectionToken(args: ServerParsedArgs, default return new ServerConnectionTokenParseError(`The connection token '${connectionToken} does not adhere to the characters 0-9, a-z, A-Z or -.`); } - if (compatibility) { - // TODO: Remove this case soon - return new OptionalServerConnectionToken(connectionToken); - } - return new MandatoryServerConnectionToken(connectionToken); } - if (compatibility) { - // TODO: Remove this case soon - console.log(`Breaking change in the next release: Please use one of the following arguments: '--connection-token', '--connection-token-file' or '--without-connection-token'.`); - return new OptionalServerConnectionToken(await defaultValue()); - } - return new MandatoryServerConnectionToken(await defaultValue()); } diff --git a/src/vs/server/test/node/serverConnectionToken.test.ts b/src/vs/server/test/node/serverConnectionToken.test.ts index cc3713ad978..0b955bbe206 100644 --- a/src/vs/server/test/node/serverConnectionToken.test.ts +++ b/src/vs/server/test/node/serverConnectionToken.test.ts @@ -27,13 +27,6 @@ suite('parseServerConnectionToken', () => { assert.ok(result.type === ServerConnectionTokenType.Mandatory); }); - test('no arguments with --compatibility generates a token that is not mandatory', async () => { - const result = await parseServerConnectionToken({ 'compatibility': '1.63' } as ServerParsedArgs, async () => 'defaultTokenValue'); - assert.ok(!(result instanceof ServerConnectionTokenParseError)); - assert.ok(result.type === ServerConnectionTokenType.Optional); - assert.strictEqual(result.value, 'defaultTokenValue'); - }); - test('--without-connection-token', async () => { const result = await parseServerConnectionToken({ 'without-connection-token': true } as ServerParsedArgs, async () => 'defaultTokenValue'); assert.ok(!(result instanceof ServerConnectionTokenParseError)); @@ -74,11 +67,4 @@ suite('parseServerConnectionToken', () => { assert.strictEqual(result.value, connectionToken); }); - test('--connection-token --compatibility marks a as not mandatory', async () => { - const connectionToken = `12345-123-abc`; - const result = await parseServerConnectionToken({ 'connection-token': connectionToken, 'compatibility': '1.63' } as ServerParsedArgs, async () => 'defaultTokenValue'); - assert.ok(!(result instanceof ServerConnectionTokenParseError)); - assert.ok(result.type === ServerConnectionTokenType.Optional); - assert.strictEqual(result.value, connectionToken); - }); });