How to Manage Electron Chromium Upgrades with electron-chromium-upgrade
Upgrading the embedded Chromium version in Electron involves managing roughly 159 patches and iterative build fixes. The process has strict rules for conflict resolution and commit formatting.
This article explains how to systematically manage Chromium version upgrades using the electron-chromium-upgrade skill from the Electron repository.
What This Skill Does
electron-chromium-upgrade guides Chromium upgrades in Electron through two phases:
- Phase One: Patch fixes (iterate
e sync --3until success) - Phase Two: Build fixes (iterate
e build -k 999until success) - Patch conflict resolution, export, and commit format enforcement
- Build error analysis and Electron-side code adaptation
Designed for Electron core team developers handling Chromium upgrades.
Installation
Prerequisites
- Claude Code installed
- Electron repository source code and build environment
ecommand (Electron development tool) available
Install Command
claude mcp add github.com/electron/electron/tree/main/.claude/skills/electron-chromium-upgrade
Usage
Phase One: Patch Fixes
# Clear conflict resolution cache
rm -rf .git/rr-cache
# Apply patches with 3-way merge
e sync --3
# After conflict resolution
git am --continue
# Export fixes to patch files
e patches {target}
# Repeat until e sync --3 succeeds
Once successful, run e patches all to export all patches and commit.
Phase Two: Build Fixes
e build -k 999 # Build with max error reporting
e build -t {target}.o # Verify specific fixes
e start --version # Validate after build success
Build errors stem from Chromium API/structure changes. Fix by adapting Electron-side code.
Important Considerations
Never Delete Patches
Do not delete patches unless 100% certain they are no longer needed. Update patch descriptions when upstream changes affect them.
Do Not Modify Chromium Code
Fix build errors by adapting Electron code, not by changing Chromium code.
Follow Commit Guidelines
Each phase has specific commit format guidelines. Always review references/phase-one-commit-guidelines.md and references/phase-two-commit-guidelines.md before committing.
Summary
electron-chromium-upgrade enables systematic Chromium upgrades through Phase One (patch fixes) and Phase Two (build fixes). Following patch management rules and commit guidelines ensures safe upgrade completion.