From: atk <atk@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] vscode: update to 1.95.0
Date: Tue, 17 Dec 2024 08:31:07 +0100 [thread overview]
Message-ID: <20241217073107.8EA4C30973@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-51909@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1243 bytes --]
There is an updated pull request by atk against master on the void-packages repository
https://github.com/atk/void-packages vscode-1.92.2
https://github.com/void-linux/void-packages/pull/51909
vscode: update to 1.95.0
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/51909.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-vscode-1.92.2-51909.patch --]
[-- Type: text/x-diff, Size: 11539 bytes --]
From ec66869051625598d9118bb93580ac368343c923 Mon Sep 17 00:00:00 2001
From: Alex Lohr <alexthkloss@web.de>
Date: Mon, 19 Aug 2024 12:41:23 +0200
Subject: [PATCH] vscode: update to 1.96.0
+update to electron33
---
.../patches/disable-crash-reporter.patch | 132 +++++++++++++++---
srcpkgs/vscode/template | 61 ++++----
2 files changed, 142 insertions(+), 51 deletions(-)
diff --git a/srcpkgs/vscode/patches/disable-crash-reporter.patch b/srcpkgs/vscode/patches/disable-crash-reporter.patch
index 579001d7485125..928ded29e0bc93 100644
--- a/srcpkgs/vscode/patches/disable-crash-reporter.patch
+++ b/srcpkgs/vscode/patches/disable-crash-reporter.patch
@@ -1,23 +1,17 @@
-From afa206dc466066c3d273dfc879103700505b3d7b Mon Sep 17 00:00:00 2001
-From: Joshua Strobl <joshua@streambits.io>
-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/main.js b/src/main.js
-index f7e6e49a967..88513af6dec 100644
---- a/src/main.js
-+++ b/src/main.js
-@@ -46,21 +46,6 @@ const argvConfig = configureCommandlineSwitchesSync(args);
+diff --git a/src/main.ts b/src/main.ts
+index ff9a5e89296..13bd078db46 100644
+--- a/src/main.ts
++++ b/src/main.ts
+@@ -10,7 +10,7 @@ import { performance } from 'perf_hooks';
+ import { configurePortable } from './bootstrap-node.js';
+ import { bootstrapESM } from './bootstrap-esm.js';
+ import { fileURLToPath } from 'url';
+-import { app, protocol, crashReporter, Menu, contentTracing } from 'electron';
++import { app, protocol, Menu, contentTracing } from 'electron';
+ import minimist from 'minimist';
+ import { product } from './bootstrap-meta.js';
+ import { parse } from './vs/base/common/jsonc.js';
+@@ -72,21 +72,6 @@ const codeCachePath = getCodeCachePath();
// Disable default menu (https://github.com/electron/electron/issues/35512)
Menu.setApplicationMenu(null);
@@ -39,3 +33,101 @@ index f7e6e49a967..88513af6dec 100644
// 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
+@@ -391,97 +376,6 @@ function getArgvConfigPath(): string {
+ return path.join(os.homedir(), dataFolderName!, 'argv.json');
+ }
+
+-function configureCrashReporter(): void {
+- let crashReporterDirectory = args['crash-reporter-directory'];
+- let submitURL = '';
+- if (crashReporterDirectory) {
+- crashReporterDirectory = path.normalize(crashReporterDirectory);
+-
+- if (!path.isAbsolute(crashReporterDirectory)) {
+- console.error(`The path '${crashReporterDirectory}' specified for --crash-reporter-directory must be absolute.`);
+- app.exit(1);
+- }
+-
+- if (!fs.existsSync(crashReporterDirectory)) {
+- try {
+- fs.mkdirSync(crashReporterDirectory, { recursive: true });
+- } catch (error) {
+- console.error(`The path '${crashReporterDirectory}' specified for --crash-reporter-directory does not seem to exist or cannot be created.`);
+- app.exit(1);
+- }
+- }
+-
+- // Crashes are stored in the crashDumps directory by default, so we
+- // need to change that directory to the provided one
+- console.log(`Found --crash-reporter-directory argument. Setting crashDumps directory to be '${crashReporterDirectory}'`);
+- app.setPath('crashDumps', crashReporterDirectory);
+- }
+-
+- // Otherwise we configure the crash reporter from product.json
+- else {
+- const appCenter = product.appCenter;
+- if (appCenter) {
+- const isWindows = (process.platform === 'win32');
+- const isLinux = (process.platform === 'linux');
+- const isDarwin = (process.platform === 'darwin');
+- const crashReporterId = argvConfig['crash-reporter-id'];
+- const uuidPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
+- if (crashReporterId && uuidPattern.test(crashReporterId)) {
+- if (isWindows) {
+- switch (process.arch) {
+- case 'x64':
+- submitURL = appCenter['win32-x64'];
+- break;
+- case 'arm64':
+- submitURL = appCenter['win32-arm64'];
+- break;
+- }
+- } else if (isDarwin) {
+- if (product.darwinUniversalAssetId) {
+- submitURL = appCenter['darwin-universal'];
+- } else {
+- switch (process.arch) {
+- case 'x64':
+- submitURL = appCenter['darwin'];
+- break;
+- case 'arm64':
+- submitURL = appCenter['darwin-arm64'];
+- break;
+- }
+- }
+- } else if (isLinux) {
+- submitURL = appCenter['linux-x64'];
+- }
+- submitURL = submitURL.concat('&uid=', crashReporterId, '&iid=', crashReporterId, '&sid=', crashReporterId);
+- // Send the id for child node process that are explicitly starting crash reporter.
+- // For vscode this is ExtensionHost process currently.
+- const argv = process.argv;
+- const endOfArgsMarkerIndex = argv.indexOf('--');
+- if (endOfArgsMarkerIndex === -1) {
+- argv.push('--crash-reporter-id', crashReporterId);
+- } else {
+- // if the we have an argument "--" (end of argument marker)
+- // we cannot add arguments at the end. rather, we add
+- // arguments before the "--" marker.
+- argv.splice(endOfArgsMarkerIndex, 0, '--crash-reporter-id', crashReporterId);
+- }
+- }
+- }
+- }
+-
+- // Start crash reporter for all processes
+- const productName = (product.crashReporter ? product.crashReporter.productName : undefined) || product.nameShort;
+- const companyName = (product.crashReporter ? product.crashReporter.companyName : undefined) || 'Microsoft';
+- const uploadToServer = Boolean(!process.env['VSCODE_DEV'] && submitURL && !crashReporterDirectory);
+- crashReporter.start({
+- companyName,
+- productName: process.env['VSCODE_DEV'] ? `${productName} Dev` : productName,
+- submitURL,
+- uploadToServer,
+- compress: true
+- });
+-}
+-
+ function getJSFlags(cliArgs: NativeParsedArgs): string | null {
+ const jsFlags: string[] = [];
+
diff --git a/srcpkgs/vscode/template b/srcpkgs/vscode/template
index 57eb6803a8e604..4e893a684386be 100644
--- a/srcpkgs/vscode/template
+++ b/srcpkgs/vscode/template
@@ -1,18 +1,18 @@
# Template file for 'vscode'
pkgname=vscode
-version=1.91.1
+version=1.96.0
revision=1
-_electronver=24.3.0
-_npmver=8.6.0
-hostmakedepends="pkg-config python3 python3-setuptools nodejs yarn tar git ripgrep"
-makedepends="libxkbfile-devel libsecret-devel libxml2-devel mit-krb5-devel ncurses-devel electron24"
-depends="libXtst ncurses nss xdg-utils ripgrep electron24"
+_electronver=33.0.2
+_npmver=10.8.3
+hostmakedepends="pkg-config python3 python3-setuptools nodejs tar git ripgrep"
+makedepends="libxkbfile-devel libsecret-devel libxml2-devel mit-krb5-devel nodejs-devel ncurses-devel electron33-devel"
+depends="libXtst ncurses nss xdg-utils ripgrep electron33"
short_desc="Microsoft Code for Linux"
maintainer="shizonic <realtiaz@gmail.com>, Alex Lohr <alexthkloss@web.de>"
license="MIT"
homepage="https://code.visualstudio.com/"
distfiles="https://github.com/microsoft/vscode/archive/refs/tags/${version}.tar.gz"
-checksum=d2ed726dd34d2e8e71d40b09c0ea648bf9b37b15982b39dddcb70d0cbfcdb45e
+checksum=89b456b01b24a3e865f7568108029a1cfd0672d2a456db66e4b47eb401e4f46e
nocross=yes # x64 build does not cut it, it contains native code
if [ "$XBPS_TARGET_WORDSIZE" = "32" ]; then
@@ -24,7 +24,7 @@ fi
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
do_configure() {
- # Use yarn to install dependencies
+ # Use npm to install dependencies
echo "" > build/npm/preinstall.js
# redirect telemetry urls to 0.0.0.0
@@ -34,17 +34,7 @@ do_configure() {
grep -rl --exclude-dir=.git -E $_TELEMETRY_URLS | xargs sed -i -E $_REPLACEMENT
# set used electron version
- vsed -e "s/^target .*/target \"${_electronver}\"/" -i .yarnrc
-
- # @vscode/ripgrep attempts to install an own version of ripgrep and provides a path
- # we want to use our own version instead, so all we need is the fixed path (/bin/rg)
- # remove @vscode/ripgrep from all package.json files it is in:
- _PACKAGE_PATTERN="\"@vscode.ripgrep\":"
- grep -rl --exclude-dir=.git -E $_PACKAGE_PATTERN | xargs sed -i -E "/${_PACKAGE_PATTERN}/d"
- # replace path import with fixed path:
- _IMPORT_PATTERN="import.*from '@vscode.ripgrep';"
- _IMPORT_REPLACEMENT="s/${_IMPORT_PATTERN}/const rgPath = '\/bin\/rg';/"
- grep -rl --exclude-dir=.git -E "$_IMPORT_PATTERN" | xargs sed -i -E "$_IMPORT_REPLACEMENT"
+ vsed -e "s/^target=\".*\"/target=\"${_electronver}\"/" -i .npmrc
}
do_build() {
@@ -58,26 +48,35 @@ do_build() {
export NODE_OPTIONS="${_mem_limit}"
- /usr/lib/node_modules/npm/bin/node-gyp-bin/node-gyp install \
- --target=$_electronver \
- --tarball=/usr/include/electron${_electronver%%.*}/node_headers.tar.gz
-
# ignore nodejs version checks, we can not pass it as an argument to
- # yarn install because it doesn't inherit properly
- echo "ignore-engines true" >> .yarnrc
+ # npm install because it doesn't inherit properly
+ echo "ignore-engines=true" >> .npmrc
- yarn install --frozen-lockfile --arch=x64
+ # @vscode/ripgrep attempts to install an own version of ripgrep and provides a path
+ # we want to use our own version instead, so all we need is the fixed path (/bin/rg)
+ mkdir local-ripgrep
+ echo "export const rgPath = '/bin/rg';" >> local-ripgrep/index.mjs
+ echo "export declare const rgPath: string;" >> local-ripgrep/index.d.ts
+ echo "{\"name\":\"@vscode/ripgrep\",\"version\":\"1.15.9\",\"main\":\"index.mjs\",\"scripts\":{\"test\":\"echo \\"Error: no test specified\\" && exit 1\"},\"author\":\"\",\"license\":\"MIT\",\"description\":\"\"}" >> local-ripgrep/package.json
+ npm install --save @vscode/ripgrep@./local-ripgrep
+ (cd remote; npm install --save @vscode/ripgrep@../local-ripgrep)
+
+ # add missing dependencies that were left over in the pre-release version of TS used here
+ #npm install --save-dev @bazel/bazelisk@1.22.0 @bazel/concatjs@5.8.1 karma-chrome-launcher@3.2.0 karma-firefox-launcher@2.1.3 karma-jasmine@5.1.0 karma-junit-reporter@2.0.1 karma-requirejs@1.1.0 karma-sourcemap-loader@0.4.0 karma@6.4.4 requirejs@2.3.7
- # patch node fs with graceful-fs to avoid using too many file descriptors
- yarn add --dev graceful-fs@4.2.11
- echo "require('graceful-fs').gracefulify(require('fs'));" > ${wrksrc}/use-graceful-fs.js
- export NODE_OPTIONS="${_mem_limit} --require ${wrksrc}/use-graceful-fs.js"
+ # update a broken ts dependency to one that is supposed to work
+ #npm install --save-dev typescript@5.7.0-beta
+
+ npm ci
# do not checksum electron, since we're using our own build
vsed -e "s/validateChecksum: true/validateChecksum: false/g" -i build/lib/electron.*s
+ # npm ls --all throws ELSPROBLEMS, but we can make do w/o --all
+ vsed -e "s/npm ls --all/npm ls/g" -i build/lib/dependencies.*s
+
export CFLAGS="$CFLAGS -I/usr/include/node"
- yarn run gulp vscode-linux-x64-min
+ npm run gulp vscode-linux-x64-min
}
do_install() {
next prev parent reply other threads:[~2024-12-17 7:31 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-19 10:42 [PR PATCH] vscode: update to 1.92.2 atk
2024-08-19 13:08 ` tranzystorekk
2024-08-20 6:46 ` tranzystorekk
2024-08-21 10:58 ` slymattz
2024-08-21 11:08 ` slymattz
2024-09-09 7:50 ` [PR PATCH] [Updated] " atk
2024-09-16 8:31 ` [PR PATCH] [Updated] vscode: update to 1.93.0 atk
2024-09-17 7:18 ` atk
2024-09-19 6:01 ` loukamb
2024-09-19 6:02 ` loukamb
2024-10-08 9:40 ` atk
2024-10-10 20:22 ` [PR PATCH] [Updated] " atk
2024-10-10 20:26 ` atk
2024-10-11 10:34 ` atk
2024-10-11 10:34 ` atk
2024-10-11 14:09 ` atk
2024-10-11 14:10 ` [PR PATCH] [Updated] " atk
2024-10-11 21:48 ` vscode: update to 1.94.2 Johnnynator
2024-10-12 7:34 ` atk
2024-10-12 16:57 ` Johnnynator
2024-10-15 5:27 ` atk
2024-10-15 14:36 ` Johnnynator
2024-10-18 21:44 ` atk
2024-10-30 11:07 ` Johnnynator
2024-10-31 7:52 ` atk
2024-10-31 7:52 ` atk
2024-10-31 17:28 ` atk
2024-10-31 18:09 ` Johnnynator
2024-11-01 8:28 ` atk
2024-11-01 9:06 ` atk
2024-11-01 11:36 ` atk
2024-11-01 11:36 ` [PR PATCH] [Updated] " atk
2024-11-04 11:07 ` atk
2024-11-04 11:08 ` atk
2024-11-04 11:10 ` atk
2024-11-05 8:53 ` [PR PATCH] [Updated] " atk
2024-11-12 9:40 ` vscode: update to 1.95.0 atk
2024-12-17 7:31 ` atk [this message]
2024-12-17 9:10 ` vscode: update to 1.96.0 atk
2025-01-07 14:26 ` Jipok
2025-01-07 15:09 ` atk
2025-01-11 18:04 ` marmeladema
2025-01-11 19:03 ` loukamb
2025-01-11 19:04 ` loukamb
2025-01-11 19:05 ` loukamb
2025-01-11 19:05 ` loukamb
2025-01-11 19:05 ` loukamb
2025-01-14 9:56 ` atk
2025-01-30 21:52 ` oreo639
2025-01-30 22:04 ` oreo639
2025-01-30 23:30 ` oreo639
2025-01-30 23:37 ` oreo639
2025-01-30 23:38 ` oreo639
2025-01-30 23:40 ` oreo639
2025-01-30 23:41 ` oreo639
2025-01-31 3:49 ` oreo639
2025-01-31 3:52 ` oreo639
2025-01-31 3:52 ` oreo639
2025-01-31 9:57 ` atk
2025-01-31 10:21 ` atk
2025-01-31 10:58 ` oreo639
2025-01-31 10:59 ` oreo639
2025-01-31 10:59 ` oreo639
2025-01-31 11:00 ` oreo639
2025-01-31 11:01 ` oreo639
2025-01-31 11:02 ` oreo639
2025-01-31 11:02 ` oreo639
2025-01-31 11:03 ` oreo639
2025-01-31 11:06 ` oreo639
2025-01-31 11:07 ` oreo639
2025-01-31 11:26 ` oreo639
2025-01-31 16:12 ` Johnnynator
2025-02-01 9:56 ` oreo639
2025-02-01 10:10 ` oreo639
2025-02-03 9:03 ` [PR PATCH] [Updated] " atk
2025-02-03 9:04 ` atk
2025-02-03 9:04 ` atk
2025-02-05 7:26 ` vscode: update to 1.96.4 Johnnynator
2025-02-05 7:26 ` [PR PATCH] [Merged]: " Johnnynator
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241217073107.8EA4C30973@inbox.vuxu.org \
--to=atk@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).