Skip to content

Commit

Permalink
feat(1.95): update patches (#2055)
Browse files Browse the repository at this point in the history
  • Loading branch information
daiyam authored Oct 13, 2024
1 parent 0489bd5 commit 7578449
Show file tree
Hide file tree
Showing 15 changed files with 196 additions and 151 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/insider-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,16 @@ jobs:
PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }}
run: ./get_pr.sh

- name: Setup GCC
uses: egor-tensin/setup-gcc@v1
with:
version: 10
platform: x64

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '18.17'
node-version: '20.17'
if: env.SHOULD_BUILD == 'yes'

- name: Install Yarn
Expand Down Expand Up @@ -260,8 +266,8 @@ jobs:
npm_arch: arm64
- vscode_arch: armhf
npm_arch: arm
- vscode_arch: ppc64le
npm_arch: ppc64
# - vscode_arch: ppc64le
# npm_arch: ppc64
- vscode_arch: riscv64
npm_arch: riscv64
env:
Expand All @@ -284,10 +290,16 @@ jobs:
PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }}
run: ./get_pr.sh

- name: Setup GCC
uses: egor-tensin/setup-gcc@v1
with:
version: 10
platform: x64

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '18.17'
node-version: '20.17'

- name: Setup Python 3
uses: actions/setup-python@v5
Expand Down Expand Up @@ -369,6 +381,12 @@ jobs:
PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }}
run: ./get_pr.sh

- name: Setup GCC
uses: egor-tensin/setup-gcc@v1
with:
version: 10
platform: x64

- name: Install GH
run: ./install_gh.sh
if: env.SHOULD_DEPLOY == 'yes'
Expand Down
26 changes: 22 additions & 4 deletions .github/workflows/stable-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,16 @@ jobs:
PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }}
run: ./get_pr.sh

- name: Setup GCC
uses: egor-tensin/setup-gcc@v1
with:
version: 10
platform: x64

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '18.17'
node-version: '20.17'
if: env.SHOULD_BUILD == 'yes'

- name: Install Yarn
Expand Down Expand Up @@ -259,8 +265,8 @@ jobs:
npm_arch: arm64
- vscode_arch: armhf
npm_arch: arm
- vscode_arch: ppc64le
npm_arch: ppc64
# - vscode_arch: ppc64le
# npm_arch: ppc64
- vscode_arch: riscv64
npm_arch: riscv64
env:
Expand All @@ -283,10 +289,16 @@ jobs:
PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }}
run: ./get_pr.sh

- name: Setup GCC
uses: egor-tensin/setup-gcc@v1
with:
version: 10
platform: x64

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '18.17'
node-version: '20.17'

- name: Setup Python 3
uses: actions/setup-python@v5
Expand Down Expand Up @@ -368,6 +380,12 @@ jobs:
PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }}
run: ./get_pr.sh

- name: Setup GCC
uses: egor-tensin/setup-gcc@v1
with:
version: 10
platform: x64

- name: Install GH
run: ./install_gh.sh
if: env.SHOULD_DEPLOY == 'yes'
Expand Down
10 changes: 8 additions & 2 deletions build/update_patches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
done
fi

for FILE in ../patches/linux/*/*.patch; do
check_file "${FILE}"
for ARCH in alpine linux osx windows; do
for FILE in "../patches/${ARCH}/"*.patch; do
check_file "${FILE}"
done

for FILE in "../patches/${ARCH}/"*/*.patch; do
check_file "${FILE}"
done
done
4 changes: 2 additions & 2 deletions electron.riscv64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -ex

export ELECTRON_VERSION="30.5.1"
export ELECTRON_VERSION="32.1.2"
export VSCODE_ELECTRON_TAG="v${ELECTRON_VERSION}.riscv1"

echo "dfae1ccddec728faa7e5dcc92fb38ee7c40251e7f7638817da1c2a94dd37b5c2 *electron-v${ELECTRON_VERSION}-linux-riscv64.zip" >> build/checksums/electron.txt
echo "1893e6e8831ddd9c30111db02ad7edbaad8ebbf43d69054657f7221fb6086819 *electron-v${ELECTRON_VERSION}-linux-riscv64.zip" >> build/checksums/electron.txt
4 changes: 2 additions & 2 deletions insider.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"tag": "1.93.0",
"commit": "5b066ec2e30cf46bc636d6d27af5404713f6b0f8"
"tag": "1.95.0",
"commit": "a016ec9b66ffdd3ff0f831768b8e75be008a54e4"
}
99 changes: 49 additions & 50 deletions patches/brand.patch

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions patches/build-version.patch
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js
index e314794..fce8d15 100644
index 53ef6f3..411da6b 100644
--- a/build/gulpfile.reh.js
+++ b/build/gulpfile.reh.js
@@ -343,2 +343,3 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
@@ -307,2 +307,3 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
const name = product.nameShort;
+ const release = packageJson.release;

@@ -346,3 +347,3 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
@@ -310,3 +311,3 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
const packageJsonStream = gulp.src(['remote/package.json'], { base: 'remote' })
- .pipe(json({ name, version, dependencies: undefined, optionalDependencies: undefined, ...(!isAMD() ? { type: 'module' } : {}) })) // TODO@esm this should be configured in the top level package.json
+ .pipe(json({ name, version, release, dependencies: undefined, optionalDependencies: undefined, ...(!isAMD() ? { type: 'module' } : {}) })) // TODO@esm this should be configured in the top level package.json
- .pipe(json({ name, version, dependencies: undefined, optionalDependencies: undefined, type: 'module' }))
+ .pipe(json({ name, version, release, dependencies: undefined, optionalDependencies: undefined, type: 'module' }))
.pipe(es.through(function (file) {
@@ -354,3 +355,3 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
@@ -318,3 +319,3 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
const productJsonStream = gulp.src(['product.json'], { base: '.' })
- .pipe(json({ commit, date: readISODate('out-build'), version }))
+ .pipe(json({ commit, date: readISODate('out-build'), version, release }))
.pipe(es.through(function (file) {
diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
index 9dfb6a3..a4277ff 100644
index d59b42d..61670c0 100644
--- a/build/gulpfile.vscode.js
+++ b/build/gulpfile.vscode.js
@@ -320,3 +320,3 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
@@ -268,3 +268,3 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op

- let version = packageJson.version;
+ let version = packageJson.version
const quality = product.quality;
@@ -328,3 +328,4 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
@@ -276,3 +276,4 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
const name = product.nameShort;
- const packageJsonUpdates = { name, version, ...(!isAMD() ? { type: 'module', main: 'out/main.js' } : {}) }; // TODO@esm this should be configured in the top level package.json
- const packageJsonUpdates = { name, version };
+ const release = packageJson.release;
+ const packageJsonUpdates = { name, version, release, ...(!isAMD() ? { type: 'module', main: 'out/main.js' } : {}) }; // TODO@esm this should be configured in the top level package.json
+ const packageJsonUpdates = { name, version, release };

@@ -345,3 +346,3 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
@@ -293,3 +294,3 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
const productJsonStream = gulp.src(['product.json'], { base: '.' })
- .pipe(json({ commit, date: readISODate('out-build'), checksums, version }))
+ .pipe(json({ commit, date: readISODate('out-build'), checksums, version, release }))
.pipe(es.through(function (file) {
diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js
index 5fa5a5d..b08e376 100644
index fb0e5a4..170c60b 100644
--- a/build/gulpfile.vscode.linux.js
+++ b/build/gulpfile.vscode.linux.js
@@ -27,4 +27,2 @@ const commit = getVersion(root);
Expand Down Expand Up @@ -73,7 +73,7 @@ index 98175f5..afacbe3 100644
+ RawVersion: `${pkg.version.replace(/-\w+$/, '')}.${pkg.release}`,
NameVersion: product.win32NameVersion + (target === 'user' ? ' (User)' : ''),
diff --git a/src/vs/base/common/product.ts b/src/vs/base/common/product.ts
index c397b1a..ccf7911 100644
index 1f58ce0..1555ae2 100644
--- a/src/vs/base/common/product.ts
+++ b/src/vs/base/common/product.ts
@@ -58,2 +58,3 @@ export interface IProductConfiguration {
Expand All @@ -90,7 +90,7 @@ index 5f6efd5..da3c54d 100644
+ output.push(`Version: ${this.productService.nameShort} ${this.productService.version} ${this.productService.release || 'Release unknown'} (${this.productService.commit || 'Commit unknown'}, ${this.productService.date || 'Date unknown'})`);
output.push(`OS Version: ${osLib.type()} ${osLib.arch()} ${osLib.release()}`);
diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts
index a98043f..b54a78f 100644
index 1a2a619..2a8d683 100644
--- a/src/vs/platform/product/common/product.ts
+++ b/src/vs/platform/product/common/product.ts
@@ -43,6 +43,7 @@ else if (globalThis._VSCODE_PRODUCT_JSON && globalThis._VSCODE_PACKAGE_JSON) {
Expand Down
19 changes: 8 additions & 11 deletions patches/crash-reporter.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
diff --git a/src/main.js b/src/main.js
index 19dde20..d9611f2 100644
--- a/src/main.js
+++ b/src/main.js
@@ -409,6 +409,8 @@ function configureCrashReporter() {
argv.splice(endOfArgsMarkerIndex, 0, '--crash-reporter-id', crashReporterId);
}
}
+ } else {
+ return;
diff --git a/src/main.ts b/src/main.ts
index 62ddd5f..a6fc3c5 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -461,2 +461,5 @@ function configureCrashReporter(): void {
}
+ else {
+ return;
+ }
}

2 changes: 1 addition & 1 deletion patches/helper/settings.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ index 99e495a..996044a 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -10,5 +10,5 @@
"cli/target": true,
"build/**/*.js.map": true,
- "build/**/*.js": {
- "when": "$(basename).ts"
- }
Expand Down
22 changes: 14 additions & 8 deletions patches/linux/client/disable-remote.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
diff --git a/build/npm/postinstall.js b/build/npm/postinstall.js
index e38c2cb..e00627c 100644
--- a/build/npm/postinstall.js
+++ b/build/npm/postinstall.js
@@ -134,2 +134,3 @@ for (let dir of dirs) {
setNpmrcConfig('remote', opts.env);
+ continue;
}
diff --git a/build/npm/dirs.js b/build/npm/dirs.js
index b9645e6..22f3450 100644
--- a/build/npm/dirs.js
+++ b/build/npm/dirs.js
@@ -47,4 +47,2 @@ const dirs = [
'extensions/vscode-test-resolver',
- 'remote',
- 'remote/web',
'test/automation',
@@ -59,4 +57,2 @@ if (fs.existsSync(`${__dirname}/../../.build/distro/npm`)) {
dirs.push('.build/distro/npm');
- dirs.push('.build/distro/npm/remote');
- dirs.push('.build/distro/npm/remote/web');
}
22 changes: 11 additions & 11 deletions patches/linux/fix-build.patch
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js
index 28ddfb0..0fd18a1 100644
index fb0e5a4..412a6cc 100644
--- a/build/gulpfile.vscode.linux.js
+++ b/build/gulpfile.vscode.linux.js
@@ -192,2 +192,3 @@ function prepareRpmPackage(arch) {
@@ -197,2 +197,3 @@ function prepareRpmPackage(arch) {
const spec = code.pipe(es.through(
+ null,
async function () {
@@ -306,4 +307,3 @@ BUILD_TARGETS.forEach(({ arch }) => {
@@ -312,4 +313,3 @@ BUILD_TARGETS.forEach(({ arch }) => {
const prepareDebTask = task.define(`vscode-linux-${arch}-prepare-deb`, task.series(rimraf(`.build/linux/deb/${debArch}`), prepareDebPackage(arch)));
- gulp.task(prepareDebTask);
- const buildDebTask = task.define(`vscode-linux-${arch}-build-deb`, buildDebPackage(arch));
+ const buildDebTask = task.define(`vscode-linux-${arch}-build-deb`, task.series(prepareDebTask, buildDebPackage(arch)));
gulp.task(buildDebTask);
@@ -312,4 +312,3 @@ BUILD_TARGETS.forEach(({ arch }) => {
@@ -318,4 +318,3 @@ BUILD_TARGETS.forEach(({ arch }) => {
const prepareRpmTask = task.define(`vscode-linux-${arch}-prepare-rpm`, task.series(rimraf(`.build/linux/rpm/${rpmArch}`), prepareRpmPackage(arch)));
- gulp.task(prepareRpmTask);
- const buildRpmTask = task.define(`vscode-linux-${arch}-build-rpm`, buildRpmPackage(arch));
+ const buildRpmTask = task.define(`vscode-linux-${arch}-build-rpm`, task.series(prepareRpmTask, buildRpmPackage(arch)));
gulp.task(buildRpmTask);
diff --git a/build/linux/dependencies-generator.js b/build/linux/dependencies-generator.js
index 19adbeb..fef80a5 100644
index 374c9b6..da5ef4d 100644
--- a/build/linux/dependencies-generator.js
+++ b/build/linux/dependencies-generator.js
@@ -24,3 +24,3 @@ const product = require("../../product.json");
// are valid, are in dep-lists.ts
-const FAIL_BUILD_FOR_NEW_DEPENDENCIES = true;
+const FAIL_BUILD_FOR_NEW_DEPENDENCIES = false;
// Based on https://source.chromium.org/chromium/chromium/src/+/refs/tags/124.0.6367.243:chrome/installer/linux/BUILD.gn;l=64-80
@@ -56,3 +56,3 @@ async function getDependencies(packageType, buildDir, applicationName, arch) {
// Based on https://source.chromium.org/chromium/chromium/src/+/refs/tags/128.0.6613.162:chrome/installer/linux/BUILD.gn;l=64-80
@@ -57,3 +57,3 @@ async function getDependencies(packageType, buildDir, applicationName, arch) {
// Add the tunnel binary.
- files.push(path.join(buildDir, 'bin', product.tunnelApplicationName));
+ // files.push(path.join(buildDir, 'bin', product.tunnelApplicationName));
// Add the main executable.
diff --git a/build/linux/dependencies-generator.ts b/build/linux/dependencies-generator.ts
index 5fe4ac5..1d3e68a 100644
index 3c7f6f5..cd33e87 100644
--- a/build/linux/dependencies-generator.ts
+++ b/build/linux/dependencies-generator.ts
@@ -25,3 +25,3 @@ import product = require('../../product.json');
// are valid, are in dep-lists.ts
-const FAIL_BUILD_FOR_NEW_DEPENDENCIES: boolean = true;
+const FAIL_BUILD_FOR_NEW_DEPENDENCIES: boolean = false;

@@ -61,3 +61,3 @@ export async function getDependencies(packageType: 'deb' | 'rpm', buildDir: stri
@@ -62,3 +62,3 @@ export async function getDependencies(packageType: 'deb' | 'rpm', buildDir: stri
// Add the tunnel binary.
- files.push(path.join(buildDir, 'bin', product.tunnelApplicationName));
+ // files.push(path.join(buildDir, 'bin', product.tunnelApplicationName));
// Add the main executable.
diff --git a/resources/linux/rpm/code.spec.template b/resources/linux/rpm/code.spec.template
index c9e57db..bda2604 100644
index a73bc02..340b94e 100644
--- a/resources/linux/rpm/code.spec.template
+++ b/resources/linux/rpm/code.spec.template
@@ -87 +87,3 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
@@ -88 +88,3 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%{_datadir}/zsh/site-functions/_%{name}
+
+%config(noreplace) /usr/share/%{name}/resources/app/product.json
Expand Down
21 changes: 11 additions & 10 deletions patches/linux/fix-reh-bootstrap.patch
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
diff --git a/src/bootstrap-amd.js b/src/bootstrap-amd.js
index 9c8daf5..297e106 100644
--- a/src/bootstrap-amd.js
+++ b/src/bootstrap-amd.js
@@ -17,3 +17,3 @@ import * as fs from 'fs';
diff --git a/src/bootstrap-esm.ts b/src/bootstrap-esm.ts
index f2cf101..d974f65 100644
--- a/src/bootstrap-esm.ts
+++ b/src/bootstrap-esm.ts
@@ -8,3 +8,3 @@ import * as fs from 'fs';
import { fileURLToPath } from 'url';
-import { createRequire, register } from 'node:module';
+import * as Module from 'node:module';
import { product, pkg } from './bootstrap-meta.js';
@@ -23,3 +23,3 @@ import * as performance from './vs/base/common/performance.js';
/** @ts-ignore */
@@ -14,3 +14,4 @@ import { INLSConfiguration } from './vs/nls.js';

-const require = createRequire(import.meta.url);
+// @ts-ignore
+const require = Module.createRequire(import.meta.url);
/** @type any */
@@ -29,3 +29,4 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
const __dirname = path.dirname(fileURLToPath(import.meta.url));
@@ -18,3 +19,4 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
// Install a hook to module resolution to map 'fs' to 'original-fs'
-if (process.env['ELECTRON_RUN_AS_NODE'] || process.versions['electron']) {
+// @ts-ignore
+if (Module.register && (process.env['ELECTRON_RUN_AS_NODE'] || process.versions['electron'])) {
const jsCode = `
@@ -44,3 +45,4 @@ if (process.env['ELECTRON_RUN_AS_NODE'] || process.versions['electron']) {
@@ -33,3 +35,4 @@ if (process.env['ELECTRON_RUN_AS_NODE'] || process.versions['electron']) {
}`;
- register(`data:text/javascript;base64,${Buffer.from(jsCode).toString('base64')}`, import.meta.url);
+ // @ts-ignore
Expand Down
Loading

0 comments on commit 7578449

Please sign in to comment.