Skip to content

Commit e7d29e9

Browse files
authored
Electron v2.0.0 (#48290)
* Update to Electron 2.0-beta.7 * back to exploration build * fix compile errors * workaround build issue (go back to 1.24.0) * bump to 1.25.0 * use electron 2.0.2 * revert custom distro
1 parent a1dd65b commit e7d29e9

File tree

19 files changed

+7459
-3942
lines changed

19 files changed

+7459
-3942
lines changed

.yarnrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
disturl "https://atom.io/download/electron"
2-
target "1.7.12"
2+
target "2.0.2"
33
runtime "electron"

resources/linux/debian/control.template

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: @@NAME@@
22
Version: @@VERSION@@
33
Section: devel
4-
Depends: libnotify4, libnss3, gnupg, apt, libxkbfile1, libgconf-2-4, libsecret-1-0
4+
Depends: libnotify4, libnss3, gnupg, apt, libxkbfile1, libgconf-2-4, libsecret-1-0, libgtk-3-0 (>= 3.10.0)
55
Priority: optional
66
Architecture: @@ARCHITECTURE@@
77
Maintainer: Microsoft Corporation <vscode-linux@microsoft.com>
@@ -12,3 +12,4 @@ Conflicts: visual-studio-@@NAME@@
1212
Replaces: visual-studio-@@NAME@@
1313
Description: Code editing. Redefined.
1414
Visual Studio Code is a new choice of tool that combines the simplicity of a code editor with what developers need for the core edit-build-debug cycle. See https://code.visualstudio.com/docs/setup/linux for installation instructions and FAQ.
15+

resources/linux/rpm/dependencies.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"libpthread.so.0(GLIBC_2.2.5)(64bit)",
55
"libpthread.so.0(GLIBC_2.3.2)(64bit)",
66
"libpthread.so.0(GLIBC_2.3.3)(64bit)",
7-
"libgtk-x11-2.0.so.0()(64bit)",
7+
"libgtk-3.so.0()(64bit)",
88
"libgdk-x11-2.0.so.0()(64bit)",
99
"libatk-1.0.so.0()(64bit)",
1010
"libgio-2.0.so.0()(64bit)",
@@ -114,7 +114,7 @@
114114
"libglib-2.0.so.0",
115115
"libgmodule-2.0.so.0",
116116
"libgobject-2.0.so.0",
117-
"libgtk-x11-2.0.so.0",
117+
"libgtk-3.so.0",
118118
"libm.so.6",
119119
"libm.so.6(GLIBC_2.0)",
120120
"libm.so.6(GLIBC_2.1)",

scripts/code-cli.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ set ELECTRON_ENABLE_LOGGING=1
2929
set ELECTRON_ENABLE_STACK_DUMPING=1
3030

3131
:: Launch Code
32-
%CODE% --debug=5874 out\cli.js . %*
32+
%CODE% --inspect=5874 out\cli.js . %*
3333
popd
3434

3535
endlocal

scripts/code-cli.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function code() {
3232
VSCODE_DEV=1 \
3333
ELECTRON_ENABLE_LOGGING=1 \
3434
ELECTRON_ENABLE_STACK_DUMPING=1 \
35-
"$CODE" --debug=5874 "$ROOT/out/cli.js" . "$@"
35+
"$CODE" --inspect=5874 "$ROOT/out/cli.js" . "$@"
3636
}
3737

3838
code "$@"

scripts/code.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
if [[ "$OSTYPE" == "darwin"* ]]; then
44
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
55
ROOT=$(dirname "$(dirname "$(realpath "$0")")")
6+
7+
# On Linux with Electron 2.0.x running out of a VM causes
8+
# a freeze so we only enable this flag on macOS
9+
export ELECTRON_ENABLE_LOGGING=1
610
else
711
ROOT=$(dirname "$(dirname "$(readlink -f $0)")")
812
fi
@@ -40,7 +44,6 @@ function code() {
4044
export NODE_ENV=development
4145
export VSCODE_DEV=1
4246
export VSCODE_CLI=1
43-
export ELECTRON_ENABLE_LOGGING=1
4447
export ELECTRON_ENABLE_STACK_DUMPING=1
4548

4649
# Launch Code

scripts/test.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
if [[ "$OSTYPE" == "darwin"* ]]; then
55
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
66
ROOT=$(dirname $(dirname $(realpath "$0")))
7+
8+
# On Linux with Electron 2.0.x running out of a VM causes
9+
# a freeze so we only enable this flag on macOS
10+
export ELECTRON_ENABLE_LOGGING=1
711
else
812
ROOT=$(dirname $(dirname $(readlink -f $0)))
913
fi
@@ -25,7 +29,6 @@ test -d node_modules || yarn
2529
node build/lib/electron.js || ./node_modules/.bin/gulp electron
2630

2731
# Unit Tests
28-
export ELECTRON_ENABLE_LOGGING=1
2932
if [[ "$OSTYPE" == "darwin"* ]]; then
3033
cd $ROOT ; ulimit -n 4096 ; \
3134
"$CODE" \

src/main.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ Error.stackTraceLimit = 100; // increase number of stack frames (from 10, https:
3737
//#endregion
3838

3939
let app = require('electron').app;
40+
41+
// TODO@Ben Electron 2.0.x: prevent localStorage migration from SQLite to LevelDB due to issues
42+
app.commandLine.appendSwitch('disable-mojo-local-storage');
43+
4044
let fs = require('fs');
4145
let path = require('path');
4246
let minimist = require('minimist');

0 commit comments

Comments
 (0)