Skip to content

chore(deps): fork 链更新到 gpui-pre fork-0.3.110 + gpui-kit 8caa3aee,shell 依赖链支持 32 位 Windows - #254

Open
feigeCode wants to merge 5 commits into
mainfrom
fix/connections-save-llm-schema
Open

feigeCode wants to merge 5 commits into
mainfrom
fix/connections-save-llm-schema

Conversation

@feigeCode

Copy link
Copy Markdown
Owner

Description

Three dependency-only commits that refresh the gpui-* fork chain and make the gpui-shell / shell-plugins dependency chain buildable on i686-pc-windows-msvc. No application logic changes.

1. Split the QuickJS runtime by pointer width (abb055843)

gpui-shell's QuickJS runtime now resolves rquickjs-jit with the compiler feature only on 64-bit macOS/Windows/Linux; every other target gets it without compiler and runs interpreter-only. The JIT path on 32-bit targets is a real 64-bit assumption (quickjs-ng nan-boxing), so the fork generates separate i686-pc-windows-msvc bindings, pins the exit-kind constants to u32 with const assertions, and makes build() fall back to the interpreter when native execution is unavailable instead of failing at the missing-bindings include!.

  • gpui-kit: 6df86ef8329a064a
  • quickjs-jit: 51c57e3c1a5b7fa

gpui-wry, gpui-kit and the rquickjs [patch] entry move to the same revision — otherwise two copies of gpui-kit / quickjs-jit coexist and their ModuleDef / Ctx / Error types stop unifying. The extension engine's host version follows the crate version (crates/extension-runtime/src/extension/manifest/shell_validation.rs).

2. Refresh the gpui-pre snapshot to fork-0.3.110 (19fd01a71)

The fork's gpui-pre-release branch is merged with upstream/main (zed ed16e536e7) and republished, so all [patch] entries point at fork-0.3.110 (single resolved revision befc48fd).

The merge changes the crate set once: upstream deleted crates/media (4b47ceb9d3 — "gpui_macos: Migrate screen capture to objc2"), so the snapshot no longer publishes gpui-pre-media and that patch entry is dropped. Nothing in Navop or in the snapshot still depends on it. The dynamic-texture API (Window::update_dynamic_texture, Window::paint_dynamic_texture, DynamicTexture) is preserved by the merge; remote_desktop_view keeps using it.

3. Adapt gpui-component to the factory-based inspector API (07dba58f0)

Upstream turned App::register_inspector_element into a factory closure (Fn(&mut Window, &mut App) -> F), because the registry memoizes one renderer per (inspector, element-state type) pair and builds it lazily on first render. gpui-component's registration now creates the DivInspector entity inside the factory instead of behind a process-wide OnceCell, following upstream's own call site in crates/inspector_ui/src/inspector.rs. Without this, gpui-component does not compile against the refreshed snapshot (error[E0593]: closure is expected to take 2 arguments, but it takes 4 arguments). gpui-kit moves 329a064a8caa3aee.

Break Changes

Extension manifests that declare gpui_shell: "0.2.0" are now rejected. The host version constant moves with the gpui-shell crate version, 0.2.00.6.1, and for a 0.x requirement the validator requires the minor to match exactly:

-const GPUI_SHELL_VERSION: &str = "0.2.0";
+const GPUI_SHELL_VERSION: &str = "0.6.1";
requires gpui-shell 0.2.0, host provides 0.6.1

Extension authors should declare 0.6.x. The in-repo fixtures and the design doc are updated accordingly.

How to Test

Run from navop/ (macOS aarch64, rustc 1.98.1):

  • cargo check -p remote_desktop_viewFinished dev profile [unoptimized + debuginfo] target(s) in 27.71s, 0 errors. This is the integration check: it compiles gpui-pre (fork-0.3.110), gpui-kit (8caa3aee), gpui-component, gpui-shell and the Navop crate that drives dynamic textures.
  • cargo metadata --format-version 1 — resolves to exactly one gpui-pre source (…gpui-pre.git?tag=fork-0.3.110#befc48fd) and one gpui-kit revision (8caa3aee); no leftover fork-0.3.109 / 329a064a entries in Cargo.lock.
  • zed merge (fork side): cargo check -p gpui -p gpui_apple -p gpui_wgpu --all-targetsFinished, 0 errors on the macOS/Metal path.
  • 32-bit fork side: cargo xwin check -p quickjs-jit-runtime -p quickjs-jit --target i686-pc-windows-msvc — 0 errors.

Not verified locally: a full i686 build of gpui-component cannot complete on macOS (its build script fails with llvm-rc: file not found : resources/windows/gpui.manifest.xml), so 32-bit Windows compilation relies on the Windows CI job, which now also checks gpui-shell and gpui-component-shell for i686-pc-windows-msvc. This PR deliberately leaves release.yml untouched: the 32-bit Windows release still excludes shell-plugins, and flipping that switch is a separate change once the CI check is green.

feigeCode and others added 5 commits September 20, 2026 14:54
gpui-shell 的 QuickJS 运行时依赖改为按目标位宽拆分:64 位
macOS/Windows/Linux 保留 `compiler`,其余目标只跑解释器,于是
i686-pc-windows-msvc 上 shell 依赖链可以编译(此前会直接报缺少
i686-pc-windows-msvc 绑定)。

- gpui-kit: 6df86ef8 → 329a064a
- quickjs-jit: 51c57e3c → 1a5b7fa

gpui-wry / gpui-kit / rquickjs patch 三行一并同步到同一 rev,避免两份
gpui-kit 与两份 quickjs-jit 并存导致 ModuleDef / Ctx / Error 类型不统一。
Snapshot cut from the local Zed `gpui-pre-release` branch after merging
`upstream/main` (zed ed16e536e7), i.e. the first refreshed snapshot since
f59ad1b / fork-0.3.109.

One crate-set change comes with the merge: upstream deleted `crates/media`
(4b47ceb9d3 "gpui_macos: Migrate screen capture to objc2 (#64251)"), so the
snapshot no longer publishes `gpui-pre-media` and the corresponding patch
entry is dropped. Nothing in Navop or in the snapshot still depends on it.

The dynamic-texture API (`Window::update_dynamic_texture`,
`Window::paint_dynamic_texture`, `DynamicTexture`) is preserved by the merge;
`remote_desktop_view` keeps using it.

Regenerated with:
  script/publish-gpui-pre-fork.py --tag fork-0.3.110
  script/migrate-to-git-fork.py --tag fork-0.3.110
gpui-pre 快照 fork-0.3.110 把 `App::register_inspector_element` 从单层闭包改成了
工厂闭包 `Fn(&mut Window, &mut App) -> F`(registry 按 (inspector, state 类型)
缓存渲染器,首次渲染时才建)。gpui-component 的 inspector 注册随之改成在工厂里
创建 `DivInspector` entity,去掉原来的进程级 `OnceCell`,写法对齐上游
`crates/inspector_ui/src/inspector.rs`。

不跟着改的话,`cargo check -p remote_desktop_view` 会在 gpui-component 上直接挂:

    error[E0593]: closure is expected to take 2 arguments, but it takes 4 arguments
      --> crates/component/src/inspector.rs:52:8

变更:
- gpui-kit 8 处 pin(`gpui-component` 等 7 个依赖 + `rquickjs` patch)→ 8caa3aee
- 文档里的 revision 同步
- Cargo.lock 重新解析

验证:cargo check -p remote_desktop_view → Finished,0 error。
abb0558 把宿主 `GPUI_SHELL_VERSION` 从 0.2.0 升到 0.6.1(跟随 gpui-shell
crate 版本),但漏了三处声明,CI 因此在 macOS / Linux / Windows 三个平台上各挂
同样的 3 条测试:

  extension::manifest::parser_tests::reference_resource_plugin_manifests_are_parser_valid
  global::tests::development_views_are_rebuilt_with_installed_views
  global::tests::invalid_development_manifest_does_not_remove_valid_views

    manifest 字段 /engines/gpui_shell 非法: requires gpui-shell 0.2.0, host provides 0.6.1

原因是 `0.x` 的兼容判定要求 minor 精确匹配
(crates/extension-runtime/src/extension/manifest/shell_validation.rs):

    if required.major == 0 { current.major == 0 && current.minor == required.minor }

补齐的三处:

- crates/extension-runtime/src/global.rs 测试内联 manifest
- docs/extension-resource-plugins/examples/elasticsearch/extension.json
- docs/extension-resource-plugins/development-guide.zh-CN.md 的示例清单

验证:cargo test -p extension-runtime --lib → 214 passed,原先挂的 3 条全绿。
唯一未过的是 db_tree_action_runs_registered_wasm_component,与本次改动无关:它
读 `fixtures/coverage-plugin/wasm/coverage_component.wat`,而 wasmtime 的 `wat`
解析器只在 crates/extension-wasm 的 `[dev-dependencies]` 里打开,CI 跑的是
`cargo test --all`(feature 统一启用)因此通过,本地收窄成 `-p extension-runtime`
就不带该 feature。该测试在本次 CI 运行的上一条日志里是通过的。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant