| name | update-gpui |
| description | Update GPUI submodule to the latest commit. Use when asked to update, bump, or upgrade the gpui dependency. |
| user_invocable | true |
Instructions
Update the GPUI git submodule and all related Cargo.toml references to the latest commit on origin/main.
Steps
-
Fetch latest from remote:
cd vendor/gpui && git fetch origin
-
Identify target commit: Use the latest commit on origin/main (or a specific commit/branch if the user provides one via $ARGUMENTS).
git log --oneline origin/main -5
-
Update submodule pointer:
git -C vendor/gpui checkout <commit-hash>
-
Update Cargo.toml: Find all rev = "..." entries pointing to the gpui git repo in the workspace Cargo.toml and update them to the new commit hash. The entries look like:
gpui = { git = "https://github.com/BumpyClock/gpui", rev = "<old-hash>", ... }
gpui_platform = { git = "https://github.com/BumpyClock/gpui", rev = "<old-hash>", ... }
Update both rev values to the full commit hash.
-
Build and verify:
cargo build
-
If build fails: Inspect errors and fix any breaking API changes in the codebase. Common issues:
- Borrow checker issues from upstream tree-sitter/API changes
- New/removed/renamed methods in gpui APIs
- Changed trait signatures
-
Run clippy:
cargo clippy -- --deny warnings
-
Report summary: Show old commit, new commit, what changed (list new commits), and whether build/clippy passed.
Notes
- The submodule is at
vendor/gpui and tracks https://github.com/BumpyClock/gpui.
- The
Cargo.toml at the workspace root has [workspace.dependencies] entries for gpui and gpui_platform that pin to a specific rev.
- Always update both the submodule pointer AND the Cargo.toml rev in lockstep.
- Always use
git + rev dependencies, never path dependencies. GPUI lives in its own repo; gpui-component consumes it as a git dependency.
- Use full 40-char commit hashes in
rev = "..." for reproducibility.
- The submodule may need
git submodule update --init vendor/gpui if not yet initialized.
- If
$ARGUMENTS contains a specific commit hash or branch, use that instead of origin/main.