Skip to content

Commit 43ef50b

Browse files
authored
Update to 1.78.2 (coder#6201)
* Update to 1.78.1 No changes needed in the patches other than moving some lines around and updating the CSP hash as usual. The flake had to be updated as it was using Node 16.16 and 16.17 is required at minimum now. Also python seems to install python2 which is marked as deprecated so explicitly install python3. * Update to 1.78.2 Patches applied without any conflicts. * Update commit environment variable This was causing the commit not to be set. It broke display languages since that has a hard dependency on the commit for directory names. Possibly broke other things.
1 parent 45c8985 commit 43ef50b

19 files changed

+149
-123
lines changed

ci/build/build-vscode.sh

+12-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ copy-bin-script() {
1515
local dest="lib/vscode-reh-web-linux-x64/bin/$script"
1616
cp "lib/vscode/resources/server/bin/$script" "$dest"
1717
sed -i.bak "s/@@VERSION@@/$(vscode_version)/g" "$dest"
18-
sed -i.bak "s/@@COMMIT@@/$VSCODE_DISTRO_COMMIT/g" "$dest"
18+
sed -i.bak "s/@@COMMIT@@/$BUILD_SOURCEVERSION/g" "$dest"
1919
sed -i.bak "s/@@APPNAME@@/code-server/g" "$dest"
2020

2121
# Fix Node path on Darwin and Linux.
@@ -51,8 +51,8 @@ main() {
5151
# Set the commit Code will embed into the product.json. We need to do this
5252
# since Code tries to get the commit from the `.git` directory which will fail
5353
# as it is a submodule.
54-
export VSCODE_DISTRO_COMMIT
55-
VSCODE_DISTRO_COMMIT=$(git rev-parse HEAD)
54+
export BUILD_SOURCEVERSION
55+
BUILD_SOURCEVERSION=$(git rev-parse HEAD)
5656

5757
# Add the date, our name, links, and enable telemetry (this just makes
5858
# telemetry available; telemetry can still be disabled by flag or setting).
@@ -109,6 +109,15 @@ EOF
109109

110110
popd
111111

112+
pushd lib/vscode-reh-web-linux-x64
113+
# Make sure Code took the version we set in the environment variable. Not
114+
# having a version will break display languages.
115+
if ! jq -e .commit product.json ; then
116+
echo "'commit' is missing from product.json"
117+
exit 1
118+
fi
119+
popd
120+
112121
# These provide a `code-server` command in the integrated terminal to open
113122
# files in the current instance.
114123
delete-bin-script remote-cli/code-server

flake.lock

+24-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
in {
1313
devShells.default = pkgs.mkShell {
1414
nativeBuildInputs = with pkgs; [
15-
nodejs yarn' python pkg-config git rsync jq moreutils quilt bats
15+
nodejs yarn' python3 pkg-config git rsync jq moreutils quilt bats
1616
];
1717
buildInputs = with pkgs; (lib.optionals (!stdenv.isDarwin) [ libsecret ]
1818
++ (with xorg; [ libX11 libxkbfile ])
19-
++ lib.optionals stdenv.isDarwin (with pkgs.darwin.apple_sdk.frameworks; [
19+
++ lib.optionals stdenv.isDarwin (with pkgs.darwin.apple_sdk.frameworks; [
2020
AppKit Cocoa CoreServices Security xcbuild
2121
]));
2222
};

lib/vscode

Submodule vscode updated 1307 files

patches/base-path.diff

+16-17
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Index: code-server/lib/vscode/src/vs/base/common/network.ts
1010
===================================================================
1111
--- code-server.orig/lib/vscode/src/vs/base/common/network.ts
1212
+++ code-server/lib/vscode/src/vs/base/common/network.ts
13-
@@ -166,7 +166,9 @@ class RemoteAuthoritiesImpl {
13+
@@ -167,7 +167,9 @@ class RemoteAuthoritiesImpl {
1414
return URI.from({
1515
scheme: platform.isWeb ? this._preferredWebSchema : Schemas.vscodeRemoteResource,
1616
authority: `${host}:${port}`,
@@ -136,24 +136,20 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
136136
if (!remoteAuthority) {
137137
return serveError(req, res, 400, `Bad request.`);
138138
}
139-
@@ -298,6 +297,8 @@ export class WebClientServer {
139+
@@ -298,8 +297,12 @@ export class WebClientServer {
140140
scopes: [['user:email'], ['repo']]
141141
} : undefined;
142142

143143
+ const base = relativeRoot(getOriginalUrl(req))
144144
+ const vscodeBase = relativePath(getOriginalUrl(req))
145-
146-
const workbenchWebConfiguration = {
147-
remoteAuthority,
148-
@@ -309,6 +310,7 @@ export class WebClientServer {
149-
workspaceUri: resolveWorkspaceURI(this._environmentService.args['default-workspace']),
150-
productConfiguration: <Partial<IProductConfiguration>>{
151-
codeServerVersion: this._productService.codeServerVersion,
152-
+ rootEndpoint: base,
153-
embedderIdentifier: 'server-distro',
154-
extensionsGallery: this._webExtensionResourceUrlTemplate ? {
155-
...this._productService.extensionsGallery,
156-
@@ -326,8 +328,10 @@ export class WebClientServer {
145+
+
146+
const productConfiguration = <Partial<IProductConfiguration>>{
147+
codeServerVersion: this._productService.codeServerVersion,
148+
+ rootEndpoint: base,
149+
embedderIdentifier: 'server-distro',
150+
extensionsGallery: this._webExtensionResourceUrlTemplate ? {
151+
...this._productService.extensionsGallery,
152+
@@ -334,11 +337,12 @@ export class WebClientServer {
157153
const values: { [key: string]: string } = {
158154
WORKBENCH_WEB_CONFIGURATION: asJSON(workbenchWebConfiguration),
159155
WORKBENCH_AUTH_SESSION: authSessionInfo ? asJSON(authSessionInfo) : '',
@@ -165,8 +161,11 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
165161
+ VS_BASE: vscodeBase,
166162
};
167163

168-
169-
@@ -344,7 +348,7 @@ export class WebClientServer {
164+
-
165+
let data;
166+
try {
167+
const workbenchTemplate = (await fsp.readFile(filePath)).toString();
168+
@@ -352,7 +356,7 @@ export class WebClientServer {
170169
'default-src \'self\';',
171170
'img-src \'self\' https: data: blob:;',
172171
'media-src \'self\';',
@@ -175,7 +174,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
175174
'child-src \'self\';',
176175
`frame-src 'self' https://*.vscode-cdn.net data:;`,
177176
'worker-src \'self\' data: blob:;',
178-
@@ -417,3 +421,70 @@ export class WebClientServer {
177+
@@ -425,3 +429,70 @@ export class WebClientServer {
179178
return void res.end(data);
180179
}
181180
}

patches/cli-window-open.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/terminal/browser/remoteTe
1717
===================================================================
1818
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/terminal/browser/remoteTerminalBackend.ts
1919
+++ code-server/lib/vscode/src/vs/workbench/contrib/terminal/browser/remoteTerminalBackend.ts
20-
@@ -100,10 +100,14 @@ class RemoteTerminalBackend extends Base
20+
@@ -97,10 +97,14 @@ class RemoteTerminalBackend extends Base
2121
}
2222
const reqId = e.reqId;
2323
const commandId = e.commandId;

patches/disable-downloads.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
7878
===================================================================
7979
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
8080
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
81-
@@ -304,6 +304,7 @@ export class WebClientServer {
81+
@@ -325,6 +325,7 @@ export class WebClientServer {
8282
remoteAuthority,
8383
webviewEndpoint: vscodeBase + this._staticRoute + '/out/vs/workbench/contrib/webview/browser/pre',
8484
userDataPath: this._environmentService.userDataPath,

patches/display-language.diff

+11-11
Original file line numberDiff line numberDiff line change
@@ -211,23 +211,23 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
211211
import { CharCode } from 'vs/base/common/charCode';
212212
import { getRemoteServerRootPath } from 'vs/platform/remote/common/remoteHosts';
213213

214-
@@ -299,6 +300,8 @@ export class WebClientServer {
214+
@@ -337,6 +338,8 @@ export class WebClientServer {
215+
callbackRoute: this._callbackRoute
216+
};
215217

216-
const base = relativeRoot(getOriginalUrl(req))
217-
const vscodeBase = relativePath(getOriginalUrl(req))
218218
+ const locale = this._environmentService.args.locale || await getLocaleFromConfig(this._environmentService.argvResource.fsPath);
219219
+ const nlsConfiguration = await getNLSConfiguration(locale, this._environmentService.userDataPath)
220-
221-
const workbenchWebConfiguration = {
222-
remoteAuthority,
223-
@@ -336,6 +339,7 @@ export class WebClientServer {
220+
const nlsBaseUrl = this._productService.extensionsGallery?.nlsBaseUrl;
221+
const values: { [key: string]: string } = {
222+
WORKBENCH_WEB_CONFIGURATION: asJSON(workbenchWebConfiguration),
223+
@@ -345,6 +348,7 @@ export class WebClientServer {
224224
WORKBENCH_NLS_BASE_URL: vscodeBase + (nlsBaseUrl ? `${nlsBaseUrl}${!nlsBaseUrl.endsWith('/') ? '/' : ''}${this._productService.commit}/${this._productService.version}/` : ''),
225225
BASE: base,
226226
VS_BASE: vscodeBase,
227227
+ NLS_CONFIGURATION: asJSON(nlsConfiguration),
228228
};
229229

230-
230+
let data;
231231
Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
232232
===================================================================
233233
--- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
@@ -261,9 +261,9 @@ Index: code-server/lib/vscode/src/vs/workbench/workbench.web.main.ts
261261
import 'vs/workbench/services/path/browser/pathService';
262262
import 'vs/workbench/services/themes/browser/browserHostColorSchemeService';
263263
import 'vs/workbench/services/encryption/browser/encryptionService';
264-
@@ -119,8 +119,9 @@ import 'vs/workbench/contrib/logs/browse
265-
// Explorer
266-
import 'vs/workbench/contrib/files/browser/files.web.contribution';
264+
@@ -116,8 +116,9 @@ registerSingleton(ILanguagePackService,
265+
// Logs
266+
import 'vs/workbench/contrib/logs/browser/logs.contribution';
267267

268268
-// Localization
269269
-import 'vs/workbench/contrib/localization/browser/localization.contribution';

patches/getting-started.diff

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/bro
1919
import { OpenFolderViaWorkspaceAction } from 'vs/workbench/browser/actions/workspaceActions';
2020
import { OpenRecentAction } from 'vs/workbench/browser/actions/windowActions';
2121
import { Toggle } from 'vs/base/browser/ui/toggle/toggle';
22-
@@ -796,6 +796,72 @@ export class GettingStartedPage extends
22+
@@ -817,6 +817,72 @@ export class GettingStartedPage extends
2323
$('p.subtitle.description', {}, localize({ key: 'gettingStarted.editingEvolved', comment: ['Shown as subtitle on the Welcome page.'] }, "Editing evolved"))
2424
);
2525

@@ -92,7 +92,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/bro
9292
const leftColumn = $('.categories-column.categories-column-left', {},);
9393
const rightColumn = $('.categories-column.categories-column-right', {},);
9494

95-
@@ -814,13 +880,23 @@ export class GettingStartedPage extends
95+
@@ -835,13 +901,23 @@ export class GettingStartedPage extends
9696
const layoutLists = () => {
9797
if (gettingStartedList.itemCount) {
9898
this.container.classList.remove('noWalkthroughs');
@@ -120,7 +120,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/bro
120120
}
121121
setTimeout(() => this.categoriesPageScrollbar?.scanDomNode(), 50);
122122
};
123-
@@ -828,13 +904,23 @@ export class GettingStartedPage extends
123+
@@ -849,13 +925,23 @@ export class GettingStartedPage extends
124124
const layoutFeaturedExtension = () => {
125125
if (featuredExtensionList.itemCount) {
126126
this.container.classList.remove('noExtensions');
@@ -238,7 +238,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
238238
===================================================================
239239
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
240240
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
241-
@@ -308,6 +308,7 @@ export class WebClientServer {
241+
@@ -328,6 +328,7 @@ export class WebClientServer {
242242
webviewEndpoint: vscodeBase + this._staticRoute + '/out/vs/workbench/contrib/webview/browser/pre',
243243
userDataPath: this._environmentService.userDataPath,
244244
isEnabledFileDownloads: !this._environmentService.args['disable-file-downloads'],

patches/integration.diff

+11-11
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Index: code-server/lib/vscode/src/vs/base/common/processes.ts
9595
--- code-server.orig/lib/vscode/src/vs/base/common/processes.ts
9696
+++ code-server/lib/vscode/src/vs/base/common/processes.ts
9797
@@ -111,6 +111,8 @@ export function sanitizeProcessEnvironme
98-
/^VSCODE_(?!(PORTABLE|SHELL_LOGIN)).+$/,
98+
/^VSCODE_(?!(PORTABLE|SHELL_LOGIN|ENV_REPLACE|ENV_APPEND|ENV_PREPEND)).+$/,
9999
/^SNAP(|_.*)$/,
100100
/^GDK_PIXBUF_.+$/,
101101
+ /^CODE_SERVER_.+$/,
@@ -107,7 +107,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/parts/dialogs/dialogHandl
107107
===================================================================
108108
--- code-server.orig/lib/vscode/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
109109
+++ code-server/lib/vscode/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
110-
@@ -76,8 +76,11 @@ export class BrowserDialogHandler extend
110+
@@ -77,8 +77,11 @@ export class BrowserDialogHandler extend
111111

112112
async about(): Promise<void> {
113113
const detailString = (useAgo: boolean): string => {
@@ -184,7 +184,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.main.ts
184184
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
185185
import { IProgressService } from 'vs/platform/progress/common/progress';
186186
import { DelayedLogChannel } from 'vs/workbench/services/output/common/delayedLogChannel';
187-
@@ -119,6 +120,9 @@ export class BrowserMain extends Disposa
187+
@@ -123,6 +124,9 @@ export class BrowserMain extends Disposa
188188
// Startup
189189
const instantiationService = workbench.startup();
190190

@@ -264,11 +264,11 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
264264
===================================================================
265265
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
266266
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
267-
@@ -308,6 +308,7 @@ export class WebClientServer {
268-
folderUri: resolveWorkspaceURI(this._environmentService.args['default-folder']),
269-
workspaceUri: resolveWorkspaceURI(this._environmentService.args['default-workspace']),
270-
productConfiguration: <Partial<IProductConfiguration>>{
271-
+ codeServerVersion: this._productService.codeServerVersion,
272-
embedderIdentifier: 'server-distro',
273-
extensionsGallery: this._webExtensionResourceUrlTemplate ? {
274-
...this._productService.extensionsGallery,
267+
@@ -299,6 +299,7 @@ export class WebClientServer {
268+
} : undefined;
269+
270+
const productConfiguration = <Partial<IProductConfiguration>>{
271+
+ codeServerVersion: this._productService.codeServerVersion,
272+
embedderIdentifier: 'server-distro',
273+
extensionsGallery: this._webExtensionResourceUrlTemplate ? {
274+
...this._productService.extensionsGallery,

patches/local-storage.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
2020
===================================================================
2121
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
2222
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
23-
@@ -303,6 +303,7 @@ export class WebClientServer {
23+
@@ -320,6 +320,7 @@ export class WebClientServer {
2424
const workbenchWebConfiguration = {
2525
remoteAuthority,
2626
webviewEndpoint: vscodeBase + this._staticRoute + '/out/vs/workbench/contrib/webview/browser/pre',

patches/logout.diff

+8-8
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
4040
===================================================================
4141
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
4242
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
43-
@@ -313,6 +313,7 @@ export class WebClientServer {
44-
codeServerVersion: this._productService.codeServerVersion,
45-
rootEndpoint: base,
46-
updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined,
47-
+ logoutEndpoint: this._environmentService.args['auth'] && this._environmentService.args['auth'] !== "none" ? base + '/logout' : undefined,
48-
embedderIdentifier: 'server-distro',
49-
extensionsGallery: this._productService.extensionsGallery,
50-
},
43+
@@ -304,6 +304,7 @@ export class WebClientServer {
44+
codeServerVersion: this._productService.codeServerVersion,
45+
rootEndpoint: base,
46+
updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined,
47+
+ logoutEndpoint: this._environmentService.args['auth'] && this._environmentService.args['auth'] !== "none" ? base + '/logout' : undefined,
48+
embedderIdentifier: 'server-distro',
49+
extensionsGallery: this._productService.extensionsGallery,
50+
};
5151
Index: code-server/lib/vscode/src/vs/workbench/browser/client.ts
5252
===================================================================
5353
--- code-server.orig/lib/vscode/src/vs/workbench/browser/client.ts

patches/marketplace.diff

+15-15
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,22 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
4949
}
5050

5151
/**
52-
@@ -312,14 +312,7 @@ export class WebClientServer {
53-
codeServerVersion: this._productService.codeServerVersion,
54-
rootEndpoint: base,
55-
embedderIdentifier: 'server-distro',
56-
- extensionsGallery: this._webExtensionResourceUrlTemplate ? {
57-
- ...this._productService.extensionsGallery,
58-
- 'resourceUrlTemplate': this._webExtensionResourceUrlTemplate.with({
59-
- scheme: 'http',
60-
- authority: remoteAuthority,
61-
- path: `${this._webExtensionRoute}/${this._webExtensionResourceUrlTemplate.authority}${this._webExtensionResourceUrlTemplate.path}`
62-
- }).toString(true)
63-
- } : undefined
64-
+ extensionsGallery: this._productService.extensionsGallery,
65-
},
66-
callbackRoute: this._callbackRoute
52+
@@ -304,14 +304,7 @@ export class WebClientServer {
53+
codeServerVersion: this._productService.codeServerVersion,
54+
rootEndpoint: base,
55+
embedderIdentifier: 'server-distro',
56+
- extensionsGallery: this._webExtensionResourceUrlTemplate ? {
57+
- ...this._productService.extensionsGallery,
58+
- 'resourceUrlTemplate': this._webExtensionResourceUrlTemplate.with({
59+
- scheme: 'http',
60+
- authority: remoteAuthority,
61+
- path: `${this._webExtensionRoute}/${this._webExtensionResourceUrlTemplate.authority}${this._webExtensionResourceUrlTemplate.path}`
62+
- }).toString(true)
63+
- } : undefined
64+
+ extensionsGallery: this._productService.extensionsGallery,
6765
};
66+
67+
if (!this._environmentService.isBuilt) {
6868
Index: code-server/lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts
6969
===================================================================
7070
--- code-server.orig/lib/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts

0 commit comments

Comments
 (0)