[arch-commits] Commit in code/trunk (PKGBUILD)

Balló György bgyorgy at archlinux.org
Tue Sep 11 00:52:41 UTC 2018


    Date: Tuesday, September 11, 2018 @ 00:52:41
  Author: bgyorgy
Revision: 379426

upgpkg: code 1.27.1-3

- Set Electron version in .yarnrc to build native modules for system electron. This value is used by the build system of vscode.
- Enlarge nodejs memory limit to 4 GB. 2 GB is too small sometimes.

Modified:
  code/trunk/PKGBUILD

----------+
 PKGBUILD |   22 ++++++++--------------
 1 file changed, 8 insertions(+), 14 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-09-10 23:19:52 UTC (rev 379425)
+++ PKGBUILD	2018-09-11 00:52:41 UTC (rev 379426)
@@ -6,7 +6,7 @@
 pkgname=code
 pkgdesc='The Open Source build of Visual Studio Code (vscode) editor'
 pkgver=1.27.1
-pkgrel=2
+pkgrel=3
 arch=('x86_64')
 url='https://github.com/Microsoft/vscode'
 license=('MIT')
@@ -54,6 +54,10 @@
 
   # See https://github.com/MicrosoftDocs/live-share/issues/262 for details
   patch -p1 < ../code-liveshare.patch
+
+  # Build native modules for system electron
+  local _target=$(</usr/lib/electron/version)
+  sed -i "s/^target .*/target \"${_target//v/}\"/" .yarnrc
 }
 
 build() {
@@ -61,20 +65,10 @@
 
   yarn install --arch=$_vscode_arch
 
-  # Rebuild native npm modules for system electron
-  # See https://electronjs.org/docs/tutorial/using-native-node-modules for details
-  sed -i '/postinstall/d' node_modules/vscode-ripgrep/package.json
-  npm rebuild \
-      --arch=$_vscode_arch \
-      --runtime=electron \
-      --target=$(</usr/lib/electron/version) \
-      --disturl=https://atom.io/download/electron \
-      --build-from-source
-
   # The default memory limit may be too low for current versions of node
-  # to successfully build vscode.  Uncomment this to set it to 2GB, or
-  # change it if this number still doesn't work for your system.
-  mem_limit="--max_old_space_size=2048"
+  # to successfully build vscode. Change it if this number still doesn't
+  # work for your system.
+  mem_limit="--max_old_space_size=4096"
 
   if ! /usr/bin/node $mem_limit /usr/bin/gulp vscode-linux-$_vscode_arch-min
   then



More information about the arch-commits mailing list