• Home
  • Raw
  • Download

Lines Matching +full:node +full:- +full:version

1 # Maintaining V8 in Node.js
6 different compared to the support horizon for Node.js. As a result, Node.js
8 to support. V8 branches in Node.js lack of an official maintenance process due
12 a workflow for maintaining the V8 branches in both Node.js LTS and current
13 releases, and discusses how the Node.js and V8 teams at Google can help.
18 [roughly 4-week release cadence][ChromiumReleaseCalendar]. At any given time
20 [V8 release process](https://v8.dev/docs/release-process). All older branches
30 * A fix needing backport is tagged w/ _merge-request-x.x_ tag. This can be done
36 * Once ready, the issue is tagged w/ _merge-approved-x.x_ and one can do the
41 ## Node.js support requirements
43 At any given time Node.js needs to be maintaining a few different V8 branches
45 The versions of V8 used in Node.js may have already been
46 abandoned by upstream V8. However, Node.js needs to continue supporting
52 Once a bug in Node.js has been identified to be caused by V8, the first step is
53 to identify the versions of Node.js and V8 affected. The bug may be present in
62 haven't encountered in Node.js yet.
66 If the bug can be reproduced on the [Node.js `canary` branch][], Chromium
67 canary, or V8 tip-of-tree, and the test case is valid, then the bug needs to be
71 * Make sure to include a link to the corresponding Node.js issue
77 branches that are still active or are branches that Node.js cares about.
87 * Identify which version of V8 the bug was fixed in.
91 bug using this [Node.js specific template][V8TemplateMergeRequest].
94 * Attach _merge-request-x.x_ labels to the bug for any active branches
102 cases we float the patch on the Node.js side. See the process on 'Backporting
109 Abandoned V8 branches are supported in the Node.js repository. The fix needs
110 to be cherry-picked in the Node.js repository and V8-CI must test the change.
115 V8 5.1 (since it was already abandoned). Since Node.js `v6.x` uses V8 5.1, the
118 #### Backporting with `git-node` (recommended)
120 You can use [`git-node`][] to help you backport patches. This removes
125 1. Install `git-node` by installing [`node-core-utils`][].
126 2. Install the prerequisites for [`git-node-v8`][].
127 3. Find the commit hash linked-to in the issue (in this case a51f429).
128 4. Checkout a branch off the appropriate _vY.x-staging_ branch (e.g.
129 _v6.x-staging_ to fix an issue in V8 5.1).
130 5. Run `git node v8 backport a51f429`.
131 6. If there are conflicts, `git-node` will wait for you to resolve them:
134 $ git node v8 backport a51f429
137 ✔ Get current V8 version
142 ◼ Increment embedder version number
149 a GUI git client), then return to the terminal running `git-node`, type
156 $ git node v8 backport a51f429
161 8. Open a PR against the v6.x-staging branch in the Node.js repository.
162 Launch the normal and [V8 CI][] using the Node.js CI system. We only
166 See [`git-node-v8-backport`][] for more documentation and additional options.
172 * Checkout a branch off the appropriate _vY.x-staging_ branch (e.g.
173 _v6.x-staging_ to fix an issue in V8 5.1).
174 * Cherry-pick the commit(s) from the V8 repository.
179 * Open a cherry-pick pull request on `nodejs/node` targeting the
180 _vY.x-staging_ branch and notify the `@nodejs/v8` team.
181 * Run the Node.js [V8 CI][] in addition to the [Node.js CI][].
182 The CI uses the `test-v8` target in the `Makefile`, which uses
183 `tools/make-v8.sh` to reconstruct a git tree in the `deps/v8` directory to
188 * Download and apply the commit linked-to in the issue (in this case a51f429):
191 curl -L https://github.com/v8/v8/commit/a51f429.patch | git am -3 --directory=deps/v8
195 may help to try to cherry-pick the merge to the oldest branch that was done
200 replace yourself as the author. `git commit --amend --reset-author`. You may
202 on Node.js. In this case the original issue was descriptive enough. Example:
205 deps: cherry-pick a51f429 from V8 upstream
208 [regexp] Fix case-insensitive matching for one-byte subjects.
212 early for one-byte subject strings, assuming that the ranges are sorted.
218 Review-Url: https://codereview.chromium.org/2159683002
219 Cr-Commit-Position: refs/heads/master@{#37833}
222 PR-URL: https://github.com/nodejs/node/pull/7833
226 * Open a PR against the `v6.x-staging` branch in the Node.js repository. Launch
227 the normal and [V8 CI][] using the Node.js CI system. We only needed to
233 that might be applicable to the abandoned branches in use by Node.js. This is
240 * `NodeJS-Backport-Review` ([V8][NodeJS-Backport-Review-V8],
241 [Chromium][NodeJS-Backport-Review-Chromium]): to be reviewed if this is
242 applicable to abandoned branches in use by Node.js. This list if regularly
243 reviewed by the Node.js team at Google to determine applicability to Node.js.
244 * `NodeJS-Backport-Approved` ([V8][NodeJS-Backport-Approved-V8],
245 [Chromium][NodeJS-Backport-Approved-Chromium]): marks bugs that are deemed
246 relevant to Node.js and should be backported.
247 * `NodeJS-Backport-Done` ([V8][NodeJS-Backport-Done-V8],
248 [Chromium][NodeJS-Backport-Done-Chromium]): Backport for Node.js has been
250 * `NodeJS-Backport-Rejected` ([V8][NodeJS-Backport-Rejected-V8],
251 [Chromium][NodeJS-Backport-Rejected-Chromium]): Backport for Node.js is not
254 The backlog of issues with such is regularly reviewed by the node-team at Google
261 Node.js keeps a vendored copy of V8 inside of the deps/ directory. In addition,
262 Node.js may need to float patches that do not exist upstream. This means that
265 V8 builds against the version of ICU supplied by Node.js,
266 see [maintaining-icu.md](./maintaining-icu.md) for special considerations.
271 Because there may be floating patches on the version of V8 in Node.js, it is
273 upstream V8 is at 5.0.71.47 and Node.js is at 5.0.71.32. It would be best to
275 patch on the copy of V8 in Node.js. This should preserve the patches/backports
276 that Node.js may be floating (or else cause a merge conflict).
278 #### Applying minor updates with `git-node` (recommended)
280 1. Install [`git-node`][] by installing [`node-core-utils`][].
281 2. Install the prerequisites for [`git-node-v8`][].
282 3. Run `git node v8 minor` to apply a minor update.
284 See [`git-node-v8-minor`][] for more documentation and additional options.
291 # Assuming your fork of Node.js is checked out in $NODE_DIR
292 # and you want to update the Node.js main branch.
293 # Find the current (OLD) version in
294 # $NODE_DIR/deps/v8/include/v8-version.h
297 git merge --ff-only origin/main
298 git checkout -b V8_NEW_VERSION
299 curl -L https://github.com/v8/v8/compare/${V8_OLD_VERSION}...${V8_NEW_VERSION}.patch | git apply --
303 V8 also keeps tags of the form _5.4-lkgr_ which point to the _Last Known Good
308 We upgrade the version of V8 in Node.js `main` whenever a V8 release goes stable
316 2. Replace the copy of V8 in Node.js with a fresh checkout of the latest stable
320 3. Reset the `v8_embedder_string` variable to "-node.0" in `common.gypi`.
321 4. Refloat (cherry-pick) all the patches from list computed in 1) as necessary.
327 git log --oneline deps/v8
330 To replace the copy of V8 in Node.js, use the [`git-node`][] tool. For example,
331 if you want to replace the copy of V8 in Node.js with the branch-head for V8 5.1
336 git node v8 major --branch=5.1-lkgr
343 The fact that Node.js keeps a vendored, potentially edited copy of V8 in deps/
348 * The process to update the version of V8 in Node.js could be automated to track
350 * It would simplify cherry-picking and porting of fixes between branches as the
351 version bumps in `v8-version.h` would happen as part of this update instead of
353 * It would simplify the V8-CI and make it more automatable.
356 * It would make it simpler to setup an automated build that tracks Node.js
361 * A script that would update the V8 in a specific Node.js branch with V8 from
363 * We need a script to bump V8 version numbers when a new version of V8 is
364 promoted from `nodejs/v8` to `nodejs/node`.
365 * Enabled the V8-CI build in Jenkins to build from the `nodejs/v8` fork.
371 [Node.js CI]: https://ci.nodejs.org/job/node-test-pull-request/
372 [Node.js `canary` branch]: https://github.com/nodejs/node-v8/tree/canary
373 [NodeJS-Backport-Approved-Chromium]: https://bugs.chromium.org/p/chromium/issues/list?can=1&q=label…
374 [NodeJS-Backport-Approved-V8]: https://bugs.chromium.org/p/v8/issues/list?can=1&q=label%3ANodeJS-Ba…
375 [NodeJS-Backport-Done-Chromium]: https://bugs.chromium.org/p/chromium/issues/list?can=1&q=label%3AN…
376 [NodeJS-Backport-Done-V8]: https://bugs.chromium.org/p/v8/issues/list?can=1&q=label%3ANodeJS-Backpo…
377 [NodeJS-Backport-Rejected-Chromium]: https://bugs.chromium.org/p/chromium/issues/list?can=1&q=label…
378 [NodeJS-Backport-Rejected-V8]: https://bugs.chromium.org/p/v8/issues/list?can=1&q=label%3ANodeJS-Ba…
379 [NodeJS-Backport-Review-Chromium]: https://bugs.chromium.org/p/chromium/issues/list?can=1&q=label%3…
380 [NodeJS-Backport-Review-V8]: https://bugs.chromium.org/p/v8/issues/list?can=1&q=label%3ANodeJS-Back…
381 [V8 CI]: https://ci.nodejs.org/job/node-test-commit-v8-linux/
384 [V8MergingPatching]: https://v8.dev/docs/merge-patch
385 [V8TemplateMergeRequest]: https://bugs.chromium.org/p/v8/issues/entry?template=Node.js%20merge%20re…
386 [V8TemplateUpstreamBug]: https://bugs.chromium.org/p/v8/issues/entry?template=Node.js%20upstream%20…
387 [`git-node-v8-backport`]: https://github.com/nodejs/node-core-utils/blob/main/docs/git-node.md#git-…
388 [`git-node-v8-minor`]: https://github.com/nodejs/node-core-utils/blob/main/docs/git-node.md#git-nod…
389 [`git-node-v8`]: https://github.com/nodejs/node-core-utils/blob/HEAD/docs/git-node.md#git-node-v8
390 [`git-node`]: https://github.com/nodejs/node-core-utils/blob/HEAD/docs/git-node.md#git-node-v8
391 [`node-core-utils`]: https://github.com/nodejs/node-core-utils#Install