ci: check lance-context with default features - #225
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>
`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 <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.
Follow-up to #224, which fixed the immediate release breakage. This addresses why CI never caught it.
The gap
The two jobs compile
lance-contextwith different feature sets:remotestyle.ymlcargo clippy --workspace --all-targets--workspaceunions all members' features, and lance-context-server/-client both enable itrelease.ymlcargo check --manifest-path crates/lance-context/Cargo.tomldefault = []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 isremote-gated) looked fine to--workspaceclippy 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
unused import: CreateGenericStoreRequest).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-powersetacross 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