Repository navigation
feat: the port — off the dead branch, onto the live one - #6
Merged
Merged
Conversation
gpui 0.2.2 was last published on 2025-10-22 and has seven versions. The live line is gpui-pre, at 0.3.9, published nine days ago. blade-graphics moved with it, and the platform left gpui for crates of its own. Staying meant staying on a snapshot of a moving framework. The port is smaller than it looked, because the *library* kept its name: the package was renamed, the library was not, so none of the 44 files that import gpui changed. What moved: gpui 0.2.2 → gpui-pre 0.3.9 blade-graphics =0.7.1 → blade-graphics 0.6 — → gpui-pre-platform 0.3.9, gpui-pre-linux 0.3.9 Application::new() → with_platform(gpui_linux::current_platform(false)) Corner → Anchor window.focus(handle) → window.focus(handle, cx) flex_grow() → flex_grow(1.0) track_scroll(handle) → track_scroll(&handle) BoxShadow gained `inset` gpui::Timer::after → cx.background_executor().timer an Entity is an IntoElement, not an Element 24 errors on the first compile, 21 in the tests, 0 at the end. **The finding that changed the gate.** gpui 0.3 records the bounds of an element — what the visual bench measures — only under `all(debug_assertions, feature = "test-support")`. A release build has no debug assertions, so the measurements find nothing and the sixteen measurement tests fail. The UI tests therefore run in the *debug* profile, and the release build is still made for the artefact it ships. That is the upstream's own condition, not a preference. **The layout did not move.** The measurements are unchanged: the row's 495 px floor, the catalogue's 660 px minimum, the 165 px name cell, the bank's 100.5 px, the plate's 96 px, the 143 px p90 name. The contract's numbers are properties of the *composition*, not of gpui's version — and the port is what proves it. 263 UI tests, both gates green, in the runner's container. The port is green in the bench; a human eye has not looked at the ported application yet. That is the next thing, and it is the operator's to do.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The port — off the dead branch, onto the live one
Draft — for review. No merge, no release.
gpui0.2.2 was last published on 2025-10-22 and has seven versions.The live line is
gpui-pre, at 0.3.9, published nine days ago.blade-graphicsmoved with it, and the platform leftgpuifor crates ofits own. Staying meant staying on a snapshot of a moving framework.
The order, and why it was that way
The interaction gate came first, on purpose. A port done blind would have
had no witness for the clicks, the focus and the drags. The bench is that
witness, and it became the port's arbiter: every measurement in the spatial
contract was re-measured by the same tests, on the new version.
The dependency set
gpui 0.2.2gpui-pre 0.3.9blade-graphics =0.7.1blade-graphics 0.6gpui-pre-platform 0.3.9gpui-pre-linux 0.3.9The port is smaller than it looked, because the library kept its name:
the package was renamed, the library was not. None of the 44 files that
import
gpuichanged.The adaptations
Application::new()→Application::with_platform(gpui_linux::current_platform(false))— the platform is explicit nowCorner→Anchorwindow.focus(handle)→window.focus(handle, cx);focus_next/focus_prevtake the appflex_grow()→flex_grow(1.0)— the factor is an argumenttrack_scroll(handle)→track_scroll(&handle)— the handle is borrowedBoxShadowgained aninsetfieldgpui::Timer::after(d)→cx.background_executor().timer(d)— the timer moved to the executorEntityis anIntoElement, not anElement— the bench's draw closures convert24 errors on the first compile, 21 in the tests, 0 at the end.
The finding that changed the gate
gpui 0.3 records the bounds of an element — what the visual bench measures —
only under
all(debug_assertions, feature = "test-support"). A release buildhas no debug assertions, so the measurements find nothing and the sixteen
measurement tests fail.
The UI tests therefore run in the debug profile, and the release build is
still made for the artefact it ships. This is the upstream's own condition,
not a preference. The cost: a second build tree in the gate — 65 s of tests
against 102 s of release build, in the runner's container, with the caches the
lockfile keys.
The layout did not move
Every measurement is unchanged, on the new version:
The contract's numbers are properties of the composition, not of gpui's
version — and the port is what proves it.
The gates
scripts/verify— PASSED,local-verify-20261021T234839Z: 1386package-manager tests, 392 CLI tests, 263 UI tests.
scripts/ci-replay --worktree— PASSED insidearchlinux:latest,local-verify-20261021T235200Z: 1388 / 392 / 263.The limits, stated
screen since the port. The interaction gate and the measurements are the
witnesses, but a human eye has not looked at the ported application.
gpui-pre— they will move too.belong to the test build, and the price of the measurements is paid
there.