You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: doc/guides/maintaining-V8.md
+18-15
Original file line number
Diff line number
Diff line change
@@ -181,16 +181,16 @@ to be cherry-picked in the Node.js repository and V8-CI must test the change.
181
181
182
182
* For each abandoned V8 branch corresponding to an LTS branch that is affected by the bug:
183
183
* Open a cherry-pick PR on nodejs/node targeting the appropriate *vY.x-staging* branch (e.g. *v6.x-staging* to fix an issue in V8-5.1).
184
-
* On Node.js < 9.0.0: Increase the patch level version in v8-version.h. This will not cause any problems with versioning because V8 will not publish other patches for this branch, so Node.js can effectively bump the patch version.
184
+
* On Node.js < 9.0.0: Increase the patch level version in `v8-version.h`. This will not cause any problems with versioning because V8 will not publish other patches for this branch, so Node.js can effectively bump the patch version.
185
185
* On Node.js >= 9.0.0: Increase the `v8_embedder_string` number in `common.gypi`.
186
186
* In some cases the patch may require extra effort to merge in case V8 has changed substantially. For important issues we may be able to lean on the V8 team to get help with reimplementing the patch.
187
187
* Run the Node.js [V8-CI](https://ci.nodejs.org/job/node-test-commit-v8-linux/) in addition to the [Node.js CI](https://ci.nodejs.org/job/node-test-pull-request/).
188
188
189
-
An example for workflow how to cherry-pick consider the following bug:
190
-
https://crbug.com/v8/5199. From the bug we can see that it was merged by V8 into
191
-
5.2 and 5.3, and not into V8 5.1 (since it was already abandoned). Since Node.js
192
-
`v6.x` uses V8 5.1, the fix needed to cherry-picked. To cherry-pick, here's an
193
-
example workflow:
189
+
An example for workflow how to cherry-pick consider the bug
190
+
[RegExp show inconsistent result with other browsers](https://crbug.com/v8/5199).
191
+
From the bug we can see that it was merged by V8 into 5.2 and 5.3, and not into
192
+
V8 5.1 (since it was already abandoned). Since Node.js `v6.x` uses V8 5.1, the
193
+
fix needed to be cherry-picked. To cherry-pick, here's an example workflow:
194
194
195
195
* Download and apply the commit linked-to in the issue (in this case a51f429). `curl -L https://github.com/v8/v8/commit/a51f429.patch | git am -3 --directory=deps/v8`. If the branches have diverged significantly, this may not apply cleanly. It may help to try to cherry-pick the merge to the oldest branch that was done upstream in V8. In this example, this would be the patch from the merge to 5.2. The hope is that this would be closer to the V8 5.1, and has a better chance of applying cleanly. If you're stuck, feel free to ping @ofrobots for help.
196
196
* Modify the commit message to match the format we use for V8 backports and replace yourself as the author. `git commit --amend --reset-author`. You may want to add extra description if necessary to indicate the impact of the fix on Node.js. In this case the original issue was descriptive enough. Example:
@@ -289,7 +289,7 @@ To audit for floating patches:
289
289
git log --oneline deps/v8
290
290
```
291
291
292
-
To replace the copy of V8 in Node.js, use the '[update-v8](https://gist.github.com/targos/8da405e96e98fdff01a395bed365b816)' script<sup>2</sup>. For example, if you want to replace the copy of V8 in Node.js with the branch-head for V8 5.1 branch:
292
+
To replace the copy of V8 in Node.js, use the `[update-v8](https://gist.github.com/targos/8da405e96e98fdff01a395bed365b816)` script<sup>2</sup>. For example, if you want to replace the copy of V8 in Node.js with the branch-head for V8 5.1 branch:
293
293
294
294
```shell
295
295
cd $NODE_DIR
@@ -306,20 +306,23 @@ This should be followed up with manual refloating of all relevant patches.
306
306
307
307
The fact that Node.js keeps a vendored, potentially edited copy of V8 in deps/
308
308
makes the above processes a bit complicated. An alternative proposal would be to
309
-
create a fork of V8 at nodejs/v8 that would be used to maintain the V8 branches.
310
-
This has several benefits:
309
+
create a fork of V8 at `nodejs/v8` that would be used to maintain the V8
310
+
branches. This has several benefits:
311
311
312
-
* The process to update the version of V8 in Node.js could be automated to track the tips of various V8 branches in nodejs/v8.
313
-
* It would simplify cherry-picking and porting of fixes between branches as the version bumps in v8-version.h would happen as part of this update instead of on every change.
312
+
* The process to update the version of V8 in Node.js could be automated to track
313
+
the tips of various V8 branches in `nodejs/v8`.
314
+
* It would simplify cherry-picking and porting of fixes between branches as the version bumps in `v8-version.h` would happen as part of this update instead of on every change.
314
315
* It would simplify the V8-CI and make it more automatable.
315
-
* The history of the V8 branch in nodejs/v8 becomes purer and it would make it easier to pull in the V8 team for help with reviewing.
316
+
* The history of the V8 branch in `nodejs/v8` becomes purer and it would make it
317
+
easier to pull in the V8 team for help with reviewing.
316
318
* It would make it simpler to setup an automated build that tracks Node.js master + V8 lkgr integration build.
317
319
318
320
This would require some tooling to:
319
321
320
322
* A script that would update the V8 in a specific Node.js branch with V8 from upstream (dependent on branch abandoned vs. active).
321
-
* We need a script to bump V8 version numbers when a new version of V8 is promoted from nodejs/v8 to nodejs/node.
322
-
* Enabled the V8-CI build in Jenkins to build from the nodejs/v8 fork.
323
+
* We need a script to bump V8 version numbers when a new version of V8 is
324
+
promoted from `nodejs/v8` to `nodejs/node`.
325
+
* Enabled the V8-CI build in Jenkins to build from the `nodejs/v8` fork.
323
326
324
327
## Proposal: Dealing with the need to float patches to a stable/beta
325
328
@@ -344,4 +347,4 @@ up working, we will investigate making this change upstream.
344
347
345
348
<sup>1</sup>Node.js 0.12 and older are intentionally omitted from this document as their support is ending soon.
346
349
347
-
<sup>2</sup>It seems that @targos is working on port of this script here https://github.com/targos/update-v8.
350
+
<sup>2</sup>@targos is working on [a port of this script](https://github.com/targos/update-v8).
0 commit comments