Conversation
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 运行的上一条日志里是通过的。
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.
Description
Three dependency-only commits that refresh the
gpui-*fork chain and make thegpui-shell/shell-pluginsdependency chain buildable oni686-pc-windows-msvc. No application logic changes.1. Split the QuickJS runtime by pointer width (
abb055843)gpui-shell's QuickJS runtime now resolvesrquickjs-jitwith thecompilerfeature only on 64-bit macOS/Windows/Linux; every other target gets it withoutcompilerand runs interpreter-only. The JIT path on 32-bit targets is a real 64-bit assumption (quickjs-ng nan-boxing), so the fork generates separatei686-pc-windows-msvcbindings, pins the exit-kind constants tou32withconstassertions, and makesbuild()fall back to the interpreter when native execution is unavailable instead of failing at the missing-bindingsinclude!.gpui-kit:6df86ef8→329a064aquickjs-jit:51c57e3c→1a5b7fagpui-wry,gpui-kitand therquickjs[patch]entry move to the same revision — otherwise two copies ofgpui-kit/quickjs-jitcoexist and theirModuleDef/Ctx/Errortypes 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-presnapshot tofork-0.3.110(19fd01a71)The fork's
gpui-pre-releasebranch is merged withupstream/main(zeded16e536e7) and republished, so all[patch]entries point atfork-0.3.110(single resolved revisionbefc48fd).The merge changes the crate set once: upstream deleted
crates/media(4b47ceb9d3— "gpui_macos: Migrate screen capture to objc2"), so the snapshot no longer publishesgpui-pre-mediaand 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_viewkeeps using it.3. Adapt
gpui-componentto the factory-based inspector API (07dba58f0)Upstream turned
App::register_inspector_elementinto 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 theDivInspectorentity inside the factory instead of behind a process-wideOnceCell, following upstream's own call site incrates/inspector_ui/src/inspector.rs. Without this,gpui-componentdoes not compile against the refreshed snapshot (error[E0593]: closure is expected to take 2 arguments, but it takes 4 arguments).gpui-kitmoves329a064a→8caa3aee.Break Changes
Extension manifests that declare
gpui_shell: "0.2.0"are now rejected. The host version constant moves with thegpui-shellcrate version,0.2.0→0.6.1, and for a0.xrequirement the validator requires the minor to match exactly: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_view—Finished dev profile [unoptimized + debuginfo] target(s) in 27.71s, 0 errors. This is the integration check: it compilesgpui-pre(fork-0.3.110),gpui-kit(8caa3aee),gpui-component,gpui-shelland the Navop crate that drives dynamic textures.cargo metadata --format-version 1— resolves to exactly onegpui-presource (…gpui-pre.git?tag=fork-0.3.110#befc48fd) and onegpui-kitrevision (8caa3aee); no leftoverfork-0.3.109/329a064aentries inCargo.lock.cargo check -p gpui -p gpui_apple -p gpui_wgpu --all-targets—Finished, 0 errors on the macOS/Metal path.cargo xwin check -p quickjs-jit-runtime -p quickjs-jit --target i686-pc-windows-msvc— 0 errors.Not verified locally: a full
i686build ofgpui-componentcannot complete on macOS (its build script fails withllvm-rc: file not found : resources/windows/gpui.manifest.xml), so 32-bit Windows compilation relies on the Windows CI job, which now also checksgpui-shellandgpui-component-shellfori686-pc-windows-msvc. This PR deliberately leavesrelease.ymluntouched: the 32-bit Windows release still excludesshell-plugins, and flipping that switch is a separate change once the CI check is green.