Up-to-date
Node.js Collaborator Summit 2018-10-12
Yang Guo Google/V8 @hashseed @v8js
Agenda
Release schedules
Versions
ABI stability
Deprecation policy
Bisection
Prague astronomical clock, source: wikipedia.org
Chromium release schedule
Current tip-of-tree version: 71
Every 6 weeks:
Code committed today reaches
Source: www.chromium.org/getting-involved/dev-channel� www.chromium.org/developers/calendar
@v8js
@hashseed
V8 release schedule
Current tip-of-tree version: 7.1
Version bump and new branch every 6 weeks
Version X.Y corresponds to Chrome XY�(no semantic versioning)
Autoroll several times per day�(updating Chrome with new V8 version)
API freeze 7 days before branch
Continuously tested against Node.js and Chromium
Maintained until next branch is promoted to stable
Source: github.com/v8/v8/wiki/Release-Process
@v8js
@hashseed
V8 release schedule
6 weeks
branch point
stable
stable
beta
stable
current (master)
current (master)
beta
beta
current (master)
backmerges
@v8js
@hashseed
Backmerges of V8 commits
V8
✓ stable and beta branches
✓ security fixes
✓ stability fixes
✗ performance improvements
✗ new features
✗ API changes
Node
✓ master and LTS branches
✓ security fixes
✓ stability fixes
✓ performance improvements
✗ new features
✗ API changes
✓ API reverts
“Float” patches downstream
Source: github.com/nodejs/node/issues/19354#issuecomment-373157341
@v8js
@hashseed
V8 version
node -e "console.log(process.versions.v8)"
7.0.276.24-node.5
not semver
@v8js
@hashseed
V8 version
node -e "console.log(process.versions.v8)"
7.0.276.24-node.5
V8 version
Build number
Patch level
Embedder string
@v8js
@hashseed
Node release schedule
Node.js master
Node.js canary
@v8js
@hashseed
Node release schedule
vee-eight-lkgr
@v8js
@hashseed
Node release schedule
LTS branch
non-LTS branch
Source: github.com/nodejs/Release
@v8js
@hashseed
V8 in Node 10
Node 10
initial release Apr. 24
LTS promotion Oct.
V8
6.5 Mar. 06
6.6 Apr. 17
6.7 May 29
6.8 July 24
6.9 Sep. 04
7.0 Oct. 16
Source: github.com/nodejs/node/issues/19354#issuecomment-373157341
@v8js
@hashseed
Compatibility table, source: astrology-zodiac-signs.com
ABI stability
API compatibility = can compile
ABI compatibility = can link
✓ add new API
✓ append enum element
✗ remove/rename API
✗ add optional function parameter
✗ reorder enum, change constant value
✗ change inline implementation in the header
@v8js
@hashseed
ABI stability
Node.js
For Node 10
Source: github.com/nodejs/node/issues/19354#issuecomment-373157341
@v8js
@hashseed
V8 in Node 10
Node 10
initial release Apr. 24
LTS promotion Oct.
V8
6.5 Mar. 06
6.6 Apr. 17
6.7 May 29
6.8 July 24
6.9 Sep. 04
7.0 Oct. 16
Source: github.com/nodejs/node/issues/19354#issuecomment-373157341
@v8js
@hashseed
Deprecation policy
V8
Node.js
Source: bit.ly/2OD9HFY
@v8js
@hashseed
Bisection, in a nutshell
Bisection
Node 8 .. Node 10 ~3600 commits
V8 6.2 .. V8 6.8 ~5800 commits
@v8js
@hashseed
Bisection in V8
Start bisection
git bisect start
Test current revision
gclient sync�tools/dev/gm.py x64.release.d8�out/x64.release/d8 -e "console.log(BigInt === undefined)"�false�git bisect bad
Choose candidate and test again. Rinse and repeat
git checkout branch-heads/6.5�gclient sync�tools/dev/gm.py x64.release.d8�out.gn/x64.release/d8 -e "console.log(BigInt === undefined)"�true�git bisect good
@v8js
@hashseed
Bisection in Node.js
Bisected to
commit 6a31d05340b22fc413ee83eaacd0a5565bbbe799�Author: Michaël Zasso <[email protected]>�Date: Wed Jul 25 19:30:07 2018 +0200�� deps: update V8 to 6.8.275.24�� PR-URL: https://github.com/nodejs/node/pull/21079� Reviewed-By: James M Snell <[email protected]>� Reviewed-By: Matteo Collina <[email protected]>� Reviewed-By: Colin Ihrig <[email protected]>� Reviewed-By: Yang Guo <[email protected]>
Now what?
@v8js
@hashseed
Finding V8 commit range
git diff 6a31d05340b^ 6a31d05340b deps/v8/include/v8-version.h��diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h�index 09c47d7e91..e57efc3084 100644�--- a/deps/v8/include/v8-version.h�+++ b/deps/v8/include/v8-version.h�@@ -9,9 +9,9 @@� // NOTE these macros are used by some of the tool scripts and the build� // system so their names cannot be changed without changing the scripts.� #define V8_MAJOR_VERSION 6�-#define V8_MINOR_VERSION 7�-#define V8_BUILD_NUMBER 288�-#define V8_PATCH_LEVEL 49�+#define V8_MINOR_VERSION 8�+#define V8_BUILD_NUMBER 275�+#define V8_PATCH_LEVEL 24
Source: https://github.com/v8/v8/wiki/Using-Git
@v8js
@hashseed
Bisect in V8, test in Node.js
Set bisection range
cd path/to/v8�git checkout 6.7.288.49�git bisect start�git bisect bad�git checkout 6.8.275.24�git bisect good
Update Node.js with V8
tools/node/update_node.py . path/to/node --gclient
Build Node.js (and hope API did not change)
cd path/to/node�./configure --build-v8-with-gn # to not rely on up-to-date gyp configs�make -j4 node
@v8js
@hashseed
New Chrome and V8 release every 6 weeks
New Node.js release every 6 months
V8 is updated between initial release and LTS promotion ABI needs to stay stable
Bisection is easier if the repro does not rely on Node.js
Reach out: @hashseed