From 087c55e8435776037d4683084622578776e39829 Mon Sep 17 00:00:00 2001 From: Beinan Date: Wed, 29 Jul 2026 07:21:25 +0000 Subject: [PATCH 1/2] fix: gate CreateGenericStoreRequest import behind remote feature `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 --- crates/lance-context/src/unified_generic.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/lance-context/src/unified_generic.rs b/crates/lance-context/src/unified_generic.rs index 86119d88..7a090a76 100644 --- a/crates/lance-context/src/unified_generic.rs +++ b/crates/lance-context/src/unified_generic.rs @@ -1,12 +1,13 @@ use std::collections::HashMap; use lance_context_api::{ - AddRowsResponse, ContextError, ContextResult, CreateGenericStoreRequest, GenericStoreApi, - SchemaSpec, + AddRowsResponse, ContextError, ContextResult, GenericStoreApi, SchemaSpec, }; use lance_context_core::{GenericStore as LocalStore, GenericStoreOptions}; use serde_json::{Map, Value}; +#[cfg(feature = "remote")] +use lance_context_api::CreateGenericStoreRequest; #[cfg(feature = "remote")] use lance_context_client::RemoteGenericStore; From bb015505431e2ac945ecb7b36fbe1af224cbd136 Mon Sep 17 00:00:00 2001 From: Beinan Date: Wed, 29 Jul 2026 07:44:58 +0000 Subject: [PATCH 2/2] ci: check lance-context with default features `cargo clippy --workspace` unions the feature sets of all members, so lance-context is always compiled with `remote` enabled by lance-context-server and -client. The release workflow instead runs `cargo check --manifest-path crates/lance-context/Cargo.toml`, where `default = []` leaves `remote` off -- a combination CI never exercised. That gap let an unused import behind `#[cfg(feature = "remote")]` reach main and fail the release job. Add an explicit default-feature clippy run so this class of cfg-gated breakage surfaces on the PR instead. Verified the new step fails on the offending commit and passes with the fix applied. Co-Authored-By: Claude --- .github/workflows/style.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index cf83a77e..fae651c2 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -48,6 +48,13 @@ jobs: sudo apt install -y clang libclang-dev protobuf-compiler - name: Clippy run: cargo clippy --workspace --all-targets -- -D warnings + # `--workspace` unions every member's features, so `lance-context` is + # always built with `remote` enabled by lance-context-server/-client. + # The release job checks the crate on its own (`default = []`), a + # combination the line above never exercises. Check it explicitly so + # cfg-gated breakage is caught here instead of at release time. + - name: Clippy (lance-context, default features) + run: cargo clippy --manifest-path crates/lance-context/Cargo.toml --all-targets -- -D warnings typos: name: Spell Check