fix: import AppContext for release-profile cx.new() in use_query_manual - #11
Open
hmziqagent wants to merge 1 commit into
Open
fix: import AppContext for release-profile cx.new() in use_query_manual#11hmziqagent wants to merge 1 commit into
hmziqagent wants to merge 1 commit into
Conversation
The #[cfg(not(debug_assertions))] fallback calls cx.new() without the AppContext trait in scope, so the crate fails to compile in any release build (cargo check/build --release). Dev builds never compile the branch, which masked it. Published 0.1.4 and 0.2.0 both carry this — any app taking gpui-query with the hook feature cannot build --release.
hmziqagent
added a commit
to hmziqagent/gpui-starter
that referenced
this pull request
Aug 22, 2026
…lint drift master CI has been red since 2026-07-21 (runs 29828508874, 30356195053): every job died at workspace-manifest load because Cargo.toml pointed the seven gpui-form* deps at absolute local paths (/Users/hmziq/fo/form/...), which exist on no runner or other dev machine. gpui-form -> git deps (no vendoring, no absolute paths) - All seven crates from freeoxide/gpui-form @ 8a373a9 (one checkout). That repo pins the identical zed gpui (1d217ee) + gpui-component (e416af7) revs as this workspace -> single unified graph; resolves to 0.5.2, the exact version master's Cargo.lock always carried. crates.io is not an option: only the older 0.5.1 architecture is published there and the -schema/-component*/-codegen crates were never published. gpui-query release build (second blocker hiding behind the first) - cargo check --release fails INSIDE published gpui-query 0.1.4 (also 0.2.0 and upstream master): the release-only #[cfg(not(debug_assertions))] fallback in hook/query_hooks.rs calls cx.new() without importing gpui::AppContext. Dev builds never compile that branch, which masked it; no release build of this pinned graph had ever run. Patch to hmziqagent/gpui-query @ f84eac4 (v0.1.4 + the one-line cfg-gated import fix; PRred upstream as freeoxide/gpui-query#11 - drop the patch once a fixed release ships). - scripts/toggle-gpui-query.sh: marker block now holds exactly one active line (default git rev <-> standalone Mac checkout); two active gpui-query keys would be a TOML duplicate-key error. Clippy / fmt (audit-sweep drift, never validated by CI) - #[allow(clippy::double_must_use)] on NotificationBackend - new nightly lint on #[async_trait]'s generated must_use wrappers. - cargo fmt --all over 20 files of drift. Release pipeline (ships broken artifacts; not exercised by CI runs) - gen-pkgbuild.sh: bake the releasing repo into the PKGBUILD's ${REPO:-...} default. release.yml's REPO env was dead code (heredoc escaping), so fork-cut releases ship PKGBUILDs whose source URL 404s. - gen-pkgbuild.sh package(): prefix paths with gpui-starter/ to match the tarball's nested layout (install hit the directory; lib/ silently skipped). Validation (local, nightly 2026-08-16, mirrors every CI job): check / check --release / clippy -- -D warnings / fmt --all --check / test -p gpui-starter --lib (187 passed) - all green.
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.
Bug
No published version of
gpui-query(0.1.4, 0.2.0) — nor current master — compiles in the release profile with thehookfeature enabled:use_query_manual's no-QueryClient fallback lives inside#[cfg(not(debug_assertions))]and callscx.new()without importinggpui::AppContext. Dev builds never compile that branch — which is why every green dev/test run masked it. Anything downstream doingcargo build --release/cargo check --releasefails inside this crate.Fix
One cfg-gated import (unconditional would warn as unused in dev):
Found while repairing gpui-starter's CI (freeoxide/gpui-starter#4); that repo currently carries the same fix via a
[patch.crates-io]git pin to a v0.1.4-based branch. Once this lands and ships in a release, the patch there can be dropped.🤖 Generated with Claude Code