Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
a7677bc
fs: use signed types for stat data
LiviaMedeiros Jul 18, 2022
b8e5873
src: use named struct instead of typedef
tniessen Jul 18, 2022
cc97a8d
meta: update AUTHORS
nodejs-github-bot Jul 18, 2022
822b9c3
util: add tokens to parseArgs
shadowspawn Jul 18, 2022
3933ce3
deps: update undici to 5.8.0
nodejs-github-bot Jul 18, 2022
d4a0d39
build: add .gitattributes for npm and other shims
hrishikesh-kadam Jul 19, 2022
a88e8e5
tools: update doc to highlight.js@11.6.0
nodejs-github-bot Jul 19, 2022
26c863d
test: ensure NODE_EXTRA_CA_CERTS not set before tests
KrayzeeKev Jul 20, 2022
5b253cc
doc: add security release specifics to releases.md
BethGriggs Jul 14, 2022
d6bc311
doc: mention Win 32-bit openssl build issue
RafaelGSS Jul 15, 2022
df9693d
tools: support versioned node shared libs on z/OS
alexcfyung Mar 8, 2022
bc376c9
tools: add support for using API key to vuln checking script
facutuesca Jul 20, 2022
212115c
child_process: do not need to count length when maxBuffer is Infinity
theanarkh Jul 21, 2022
07c8c4e
http: add drop request event for http server
theanarkh Jul 22, 2022
822fa99
tools: add verbose flag to inactive TSC finder
Trott Jul 22, 2022
e0a8a58
doc: add F3n67u to collaborators
F3n67u Jul 23, 2022
12da85a
doc: fix typo in http.md
airingursb Jul 23, 2022
fc872e5
deps: update hast-util-raw
MoLow Jul 23, 2022
d69b19b
test: simplify ReplStream.wait()
tniessen Jul 23, 2022
687b79a
dns: fix cares memory leak
theanarkh Jul 24, 2022
ad2da1f
dns: fix getServers return undefined
jiahao-si Jul 24, 2022
e297afb
cluster: send connection to other server when worker drop it
theanarkh Jul 24, 2022
a9ab465
stream: fix 0 transform hwm backpressure
ronag Jul 24, 2022
aff813f
util: remove unicode support todo for perf implications
Anemy Jul 24, 2022
34e2c9c
doc: remind backporter about v8_embedder_string
kvakil Jul 24, 2022
7e75216
process: use `defineProperty` instead of assignment
erights Jul 24, 2022
72995c0
meta: update `node-api` in label-pr-config
daeyeon Jul 24, 2022
0ed25c3
doc: fix typo in `src/crypto/README.md`
Jianru-Lin Jul 24, 2022
5cc7554
test: fix test http upload timeout
theanarkh Jul 24, 2022
95dbd86
deps: update corepack to 0.12.1
nodejs-github-bot Jul 24, 2022
ffecb8a
meta: update AUTHORS
nodejs-github-bot Jul 24, 2022
3c077ab
doc: clarify subprocess.stdout/in/err property
cola119 Jul 24, 2022
8339409
test: simplify test-tls-set-secure-context
tniessen Jul 24, 2022
75e60cb
test: work scheduled in process.nextTick can keep the event loop alive
andreubotella Jul 24, 2022
105453b
buffer: do not leak memory if buffer is too big
kvakil Jul 24, 2022
7acbe8f
trace_events: trace net connect event
theanarkh Jul 24, 2022
5e9bdb6
test: remove test-whatwg-events-add-event-listener-options-once.js
F3n67u Jul 24, 2022
e6048b0
inspector: set sampling interval before start
codebytere Jul 25, 2022
b957882
net: fix socket._getpeername
daeyeon Jul 25, 2022
24b4a59
doc: recommend git-node-v8
kvakil Jul 25, 2022
8744e6b
tools: add more options to track flaky tests
aduh95 Jul 25, 2022
122864f
doc: improve documentation for safe `Promise` statics alternatives
aduh95 Jul 25, 2022
7f33433
doc: inspector.close undefined in worker threads
kvakil Jul 16, 2022
23cab44
test: update WPT encoding tests
cola119 Jul 25, 2022
acc68c9
doc: update email and mailmap for BethGriggs
BethGriggs Jul 25, 2022
1073bee
src: pass only Isolate* and env_vars to EnabledDebugList::Parse()
RaisinTen Jul 15, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
doc: recommend git-node-v8
Per the comments in #43924, almost everyone uses `git-node-v8`. I
included example steps for using `git-node-v8`.

I ran through both of these instructions on a clean Linux machine (I had
to fudge the patch SHA of course) and they seemed to work.

Refs: #43924

PR-URL: #43934
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
  • Loading branch information
kvakil authored and targos committed Jul 31, 2022
commit 24b4a59fd1e7c738e501340615ec7de2090f8b07
84 changes: 73 additions & 11 deletions doc/contributing/maintaining-V8.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,64 @@ backport the fix:
Abandoned V8 branches are supported in the Node.js repository. The fix needs
to be cherry-picked in the Node.js repository and V8-CI must test the change.

As an example for how to backport changes, consider the bug
[RegExp show inconsistent result with other browsers](https://crbug.com/v8/5199).
From the bug we can see that it was merged by V8 into 5.2 and 5.3, and not into
V8 5.1 (since it was already abandoned). Since Node.js `v6.x` uses V8 5.1, the
fix needed to be backported.

#### Backporting with `git-node` (recommended)

You can use [`git-node`][] to help you backport patches. This removes
some manual steps and is recommended.

Here are the steps for the bug mentioned above:

1. Install `git-node` by installing [`node-core-utils`][].
2. Install the prerequisites for [`git-node-v8`][].
3. Find the commit hash linked-to in the issue (in this case a51f429).
4. Checkout a branch off the appropriate _vY.x-staging_ branch (e.g.
_v6.x-staging_ to fix an issue in V8 5.1).
5. Run `git node v8 backport a51f429`.
6. If there are conflicts, `git-node` will wait for you to resolve them:

```console
$ git node v8 backport a51f429
✔ Update local V8 clone
❯ V8 commit backport
✔ Get current V8 version
✔ Generate patches
❯ Apply and commit patches to deps/v8
❯ Commit a51f429772d1
⠏ Apply patch
◼ Increment embedder version number
◼ Commit patch

? Resolve merge conflicts and enter 'RESOLVED' ‣
```

Resolve conflicts, stage the files (you may need to open another terminal or use
a GUI git client), then return to the terminal running `git-node`, type
`RESOLVED`, and hit <kbd>Enter</kbd>.

7. After you resolve conflicts (or if there are no conflicts), the
output should look like this:

```console
$ git node v8 backport a51f429
✔ Update local V8 clone
✔ V8 commit backport
```

8. Open a PR against the v6.x-staging branch in the Node.js repository.
Launch the normal and [V8 CI][] using the Node.js CI system. We only
needed to backport to v6.x as the other LTS branches weren't affected
by this bug.

See [`git-node-v8-backport`][] for more documentation and additional options.

#### Backporting manually

* For each abandoned V8 branch corresponding to an LTS branch that is affected
by the bug:
* Checkout a branch off the appropriate _vY.x-staging_ branch (e.g.
Expand All @@ -224,14 +282,7 @@ to be cherry-picked in the Node.js repository and V8-CI must test the change.
`tools/make-v8.sh` to reconstruct a git tree in the `deps/v8` directory to
run V8 tests.[^2]

The [`git-node`][] tool can be used to simplify this task. Run
`git node v8 backport <sha>` to cherry-pick a commit.

An example for workflow how to cherry-pick consider the bug
[RegExp show inconsistent result with other browsers](https://crbug.com/v8/5199).
From the bug we can see that it was merged by V8 into 5.2 and 5.3, and not into
V8 5.1 (since it was already abandoned). Since Node.js `v6.x` uses V8 5.1, the
fix needed to be cherry-picked. To cherry-pick, here's an example workflow:
Here are the steps for the bug mentioned above:

* Download and apply the commit linked-to in the issue (in this case a51f429):

Expand Down Expand Up @@ -323,6 +374,16 @@ compute the diff between these tags on the V8 repository, and then apply that
patch on the copy of V8 in Node.js. This should preserve the patches/backports
that Node.js may be floating (or else cause a merge conflict).

#### Applying minor updates with `git-node` (recommended)

1. Install [`git-node`][] by installing [`node-core-utils`][].
2. Install the prerequisites for [`git-node-v8`][].
3. Run `git node v8 minor` to apply a minor update.

See [`git-node-v8-minor`][] for more documentation and additional options.

#### Applying minor updates manually

The rough outline of the process is:

```bash
Expand All @@ -341,9 +402,6 @@ curl -L https://github.com/v8/v8/compare/${V8_OLD_VERSION}...${V8_NEW_VERSION}.p
V8 also keeps tags of the form _5.4-lkgr_ which point to the _Last Known Good
Revision_ from the 5.4 branch that can be useful in the update process above.

The [`git-node`][] tool can be used to simplify this task. Run `git node v8 minor`
to apply a minor update.

### Major updates

We upgrade the version of V8 in Node.js `main` whenever a V8 release goes stable
Expand Down Expand Up @@ -430,4 +488,8 @@ This would require some tooling to:
[V8MergingPatching]: https://v8.dev/docs/merge-patch
[V8TemplateMergeRequest]: https://bugs.chromium.org/p/v8/issues/entry?template=Node.js%20merge%20request
[V8TemplateUpstreamBug]: https://bugs.chromium.org/p/v8/issues/entry?template=Node.js%20upstream%20bug
[`git-node-v8-backport`]: https://github.com/nodejs/node-core-utils/blob/main/docs/git-node.md#git-node-v8-backport-sha
[`git-node-v8-minor`]: https://github.com/nodejs/node-core-utils/blob/main/docs/git-node.md#git-node-v8-minor
[`git-node-v8`]: https://github.com/nodejs/node-core-utils/blob/HEAD/docs/git-node.md#git-node-v8
[`git-node`]: https://github.com/nodejs/node-core-utils/blob/HEAD/docs/git-node.md#git-node-v8
[`node-core-utils`]: https://github.com/nodejs/node-core-utils#Install