fix: gate CreateGenericStoreRequest import behind remote feature - #224
Merged
beinan merged 1 commit intoJul 29, 2026
Merged
Conversation
`CreateGenericStoreRequest` is only referenced by `connect_or_create`, which is `#[cfg(feature = "remote")]`. Importing it unconditionally made it an unused import in default-feature builds, failing the release workflow's `cargo check` under `-D warnings`. Move the import into the existing `#[cfg(feature = "remote")]` group so it is present exactly where it is used. Co-Authored-By: Claude <noreply@anthropic.com>
beinan
added a commit
that referenced
this pull request
Jul 29, 2026
Follow-up to #224, which fixed the immediate release breakage. This addresses *why CI never caught it*. ## The gap The two jobs compile `lance-context` with different feature sets: | | command | `remote` | |---|---|---| | `style.yml` | `cargo clippy --workspace --all-targets` | **on** — `--workspace` unions all members' features, and lance-context-server/-client both enable it | | `release.yml` | `cargo check --manifest-path crates/lance-context/Cargo.toml` | **off** — `default = []` | So CI has never compiled this crate in its default configuration. Code behind `#[cfg(feature = "remote")]` is only ever seen in the enabled state. That is exactly how #224 slipped through: an import used solely by `connect_or_create` (which is `remote`-gated) looked fine to `--workspace` clippy and only became an unused import in the release job's single-crate check. ## Change Add one explicit clippy step covering the default-feature configuration the release job actually uses. ## Verification - On the offending commit, the new step reproduces the release failure (`unused import: CreateGenericStoreRequest`). - With #224 applied, it passes. ## Note Stacked on #224, so this branch contains that fix too and its CI is green. Merge #224 first and this diff reduces to the workflow change alone. A broader option is `cargo hack --feature-powerset` across the workspace, which would cover every crate rather than just this one. That is a heavier change in both CI time and setup, so I kept this targeted — happy to go that route instead if you'd prefer. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude <noreply@anthropic.com>
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.
Problem
The Create Release run failed at the Update Cargo lock version step:
Cause
CreateGenericStoreRequestis used — byGenericStore::connect_or_create, which is#[cfg(feature = "remote")]. The import itself was unconditional, so in default-feature builds the symbol is imported but never referenced.Note that simply deleting the import would break
--features remote; the fix has to keep it available on that path.Fix
Move the import into the existing
#[cfg(feature = "remote")]group next toRemoteGenericStore, so it is present exactly where it is used.Verification
Both configurations checked under the same
-D warningsthe release job uses:RUSTFLAGS="-D warnings" cargo check -p lance-context→ FinishedRUSTFLAGS="-D warnings" cargo check -p lance-context --features remote→ Finished🤖 Generated with Claude Code