Files
Metal AgentandClaude Opus 5 3cb5e1002c Name the closure's own context where the framework now demands one
Stage 4 of decision 0023, finished. The dependency swap itself compiled the
whole closure on the first attempt; what did not compile was `apps/lumbridge`,
and the entire API delta across a ten-month jump turned out to be three
signatures over 19 call sites.

`Window::focus` is now `focus(&mut self, handle: &FocusHandle, cx: &mut App)`
-- 16 sites. `flex_shrink()` takes the factor it used to assume, so it is
`flex_shrink(1.0)` -- 2 sites. `Application::new()` is gone with the rest of
the entry point, and is `gpui_platform::application()` -- 1 site. That is all
of it. Nothing else in the framework's surface moved under this product in ten
months.

The interesting failure was in the fix, not the framework. Adding `, cx` to
every `window.focus` site is right in a method that owns a `cx` parameter and
wrong inside `cx.listener(...)`, whose closure is handed its own context as a
fourth argument that this code discarded as `_`. One such site capturing the
outer `cx` produced 35 errors -- E0596, two E0521s, an E0500, thirty E0501s and
two E0524s -- none of which named the actual mistake, and all of which vanished
when the discarded parameter was given the name it should have had. Worth
recording: a borrow-checker avalanche after a dependency bump is far more
likely to be one wrong capture than a framework that changed its ownership
model.

No crate outside `apps/lumbridge` needed a single change, because none of them
imports a gpui type. That boundary was not designed for this and paid for
itself anyway.

`scripts/workspace-guard.sh` now asserts what it exists to assert. It compared
`gpui` against version 0.2.2 from the crates.io registry, which after the swap
was a guard that would have failed on the correct state of the tree. It now
checks that `gpui` and `gpui_platform` both carry
git+https://github.com/zed-industries/zed.git at rev ce48461e -- the same rev,
because the pair are one framework snapshot and a disagreement between them
would compile against two. Their versions (0.2.2 and 0.1.0) are deliberately
not asserted; neither has been bumped upstream in ten months and neither means
anything. Both failure modes were induced before being trusted: a wrong
expected rev fails on both packages, and a lockfile where only gpui_platform's
rev is altered fails on that package alone.

One thing to fix next, not here: `cargo deny check sources` now fails. Decision
0023 predicted the move would bring two Git sources; the resolved graph brings
four. wasm_thread (via gpui_web and scheduler) and xim-rs, which supplies
zed-xim, xim-ctext and xim-parser to gpui_linux, are both unallowed, and
zed-industries/scap is in the lockfile too. deny.toml is named in AGENTS.md as
a file a decision record governs, so it is left alone and reported rather than
edited underneath this commit.

The UI gate is green: workspace-guard, fmt, clippy with -D warnings over
--all-targets --all-features, and 79 tests passing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SPYebLiN2w4TqnHUYGdECq
2026-09-01 13:22:50 -07:00

34 lines
1.6 KiB
TOML

[package]
name = "lumbridge"
description = "Local-first workspace and terminal multiplexer for agentic engineers"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
[dependencies]
# Pinned to a full revision by decision 0023. crates.io publishing of gpui
# stopped in October 2025, the platform backends moved into crates Zed does
# not publish, and gpui's own x11/wayland features became empty markers
# there -- so the published crate can no longer build a Linux shell at all.
# Both crates must carry the SAME rev; workspace-guard.sh asserts it.
gpui = { git = "https://github.com/zed-industries/zed.git", rev = "ce48461eaadd16c65c31f835511ab96bd3b6e746", default-features = false, features = ["wayland", "x11"] }
gpui_platform = { git = "https://github.com/zed-industries/zed.git", rev = "ce48461eaadd16c65c31f835511ab96bd3b6e746", default-features = false, features = ["font-kit", "wayland", "x11"] }
lumbridge-core = { path = "../../crates/lumbridge-core" }
lumbridge-harness = { path = "../../crates/lumbridge-harness" }
lumbridge-runtime = { path = "../../crates/lumbridge-runtime" }
lumbridge-settings = { version = "0.0.1", path = "../../crates/lumbridge-settings" }
lumbridge-storage = { path = "../../crates/lumbridge-storage" }
lumbridge-terminal = { path = "../../crates/lumbridge-terminal" }
lumbridge-theme = { path = "../../crates/lumbridge-theme" }
lumbridge-ui-fixture = { path = "../../crates/lumbridge-ui-fixture" }
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
[dev-dependencies]
tempfile = "3.27.0"
[lints]
workspace = true