Description
As discussed in a previous LTS WG meeting, the V8 team would like help the LTS effort. One concrete area where we could help is how V8 patches are being managed on the LTS (and other) branches.
Node.js currently is maintaining patches in their copy of V8. This copy of V8 is located in a subdirectory without any reference to the imported V8 commit. On top of this import Node.js maintains floating patches in order to make Node.js work with V8 or add more bug fixes and features. The important point is that those floating patches are not in an official V8 branch in the V8 repo.
It would be beneficial for Node.js to have a solution to clearly identify those floating patches from the V8 base import. Additionally it would be helpful to be able to keep track of which patches got merged into which branch.
Some of them are pulled into V8 as long as the branch is still active on the V8 side. It would be beneficial if Node.js didn't have to maintain their in-tree V8 fork anymore but push all the patches upstream into a V8 repo.
The Node.js team at Google outlined two potential solutions. Feel free to add your own ideas!
Maintain all the floating patches in the V8 repository on Chrome's infrastructure
A prerequisite is that the Node.js build is able to pull in a specific V8 commit/ref. This is similar to V8's DEPS format.
This means that V8 creates separate release branches for Node.js in V8's repository: e.g. node-master, node-current, node-lts, node-maintenance. Node is then going to directly import the HEAD of each branch into their respective Node.js branch.
Node.js benefits:
- Node.js gets V8 test coverage for the patches
- V8 only runs a very limited subset of the ToT waterfall on those branches
- Node.js recently added ability to run V8 tests in their CI, which could be used.
- It makes it easier for Node.js developers to contact V8 developers for code-reviews
- On the other side Node.js developers need to use V8's infrastructure
- Tracking of merges works if V8's merge scripts are used.
Node.js drawbacks:
- Node.js maintainers need to heed V8's workflow for patches (including the tools)
- Node.js is completely dependant on V8's infrastructure
- As a contingency node.js probably still wants to be able to float patches which raises the question why we are doing this?
- Complicates branching/versioning/handling merges because two branches with the same origin might start to differ and e.g. 5.6.333.67 might point to two different commits.
Maintain all the floating patches in a V8 fork on GitHub
A prerequisite is that the Node.js build is able to pull in a specific V8 commit/ref. This is similar to V8's DEPS format.
Another solution would be create a V8 fork in the github nodejs or v8 organizations which automatically gets synced with the official V8 repo (Currently V8 is doing the reverse and maintaining a Node.js fork for integrating a new V8 version.). On the V8 fork the branches node-master, node-current, node-lts, node-maintenance are created. Node.js can then directly import the HEAD of each branch into their respective Node.js branch.
Node.js benefits:
- Node.js developers can use their own merge processes and tools
- Node.js' build does not need to be integrated with another system (Chrome infrastructure)
- Tracking of merges works if V8's merge scripts are used.
- We should be able to adapt tools/release/merge_to_branch.py to be able service a V8 fork repo
Node.js drawbacks:
- No test coverage from the V8 infrastructure
- Which probably is not needed because Node.js infrastructure can execute V8 tests
- Complicates branching/versioning/handling merges because two branches with the same origin might start to differ and e.g. 5.6.333.67 might point to two different commits.
It would be great to get some more input on this analysis.