Skip to content

Commit 42de61e

Browse files
legendecasaduh95
authored andcommitted
doc: add verification steps of V8 major upgrades
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net> PR-URL: #67559 Reviewed-By: Tierney Cyren <hello@bnb.im> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 27b8b0b commit 42de61e

1 file changed

Lines changed: 22 additions & 5 deletions

File tree

‎doc/contributing/maintaining/maintaining-V8.md‎

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -354,23 +354,39 @@ above. A better strategy is to
354354
4. Refloat (cherry-pick) all the patches from list computed in 1) as necessary.
355355
Some of the patches may no longer be necessary.
356356

357-
To audit for floating patches:
357+
To audit for floating patches, use `git node v8 list-patches` with the
358+
target V8 release line. For example, before upgrading to V8 15.7:
358359

359360
```bash
360-
git log --oneline deps/v8
361+
cd $NODE_DIR
362+
git node v8 list-patches --target=15.7
361363
```
362364

365+
It lists every V8 patch floated since the last V8 import, and whether the
366+
target line already contains each one. See [`git-node-v8-list-patches`][] for
367+
how to read the output.
368+
363369
To replace the copy of V8 in Node.js, use the [`git-node`][] tool. For example,
364-
if you want to replace the copy of V8 in Node.js with the branch-head for V8 5.1
365-
branch:
370+
if you want to replace the copy of V8 in Node.js with the branch-head for V8
371+
15.7 branch:
366372

367373
```bash
368374
cd $NODE_DIR
369-
git node v8 major --branch=5.1-lkgr
375+
git node v8 major --branch=15.7-lkgr
370376
```
371377

372378
This should be followed up with manual refloating of all relevant patches.
373379

380+
After refloating, run `list-patches` on the upgrade branch to verify the
381+
result:
382+
383+
```bash
384+
git node v8 list-patches --base=HEAD --check-diff
385+
```
386+
387+
Check that the listed patches match the ones the earlier run marked to refloat,
388+
and that each cherry-pick's diff matches its upstream commit.
389+
374390
## Proposal: Using a fork repository to track upstream V8
375391

376392
The fact that Node.js keeps a vendored, potentially edited copy of V8 in deps/
@@ -419,6 +435,7 @@ This would require some tooling to:
419435
[V8TemplateUpstreamBug]: https://bugs.chromium.org/p/v8/issues/entry?template=Node.js%20upstream%20bug
420436
[`@node-core/utils`]: https://github.com/nodejs/node-core-utils#Install
421437
[`git-node-v8-backport`]: https://github.com/nodejs/node-core-utils/blob/main/docs/git-node.md#git-node-v8-backport-sha
438+
[`git-node-v8-list-patches`]: https://github.com/nodejs/node-core-utils/blob/main/docs/git-node.md#git-node-v8-list-patches
422439
[`git-node-v8-minor`]: https://github.com/nodejs/node-core-utils/blob/main/docs/git-node.md#git-node-v8-minor
423440
[`git-node-v8`]: https://github.com/nodejs/node-core-utils/blob/HEAD/docs/git-node.md#git-node-v8
424441
[`git-node`]: https://github.com/nodejs/node-core-utils/blob/HEAD/docs/git-node.md#git-node-v8

0 commit comments

Comments
 (0)