You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
job.rs references Error::Http unconditionally though the variant is remote-gated — fails to compile without the "remote" feature #4096
Building the lancedb crate at v0.38.0 with default-features = false and without
the remote feature fails to compile:
error[E0599]: no variant named `Http` found for enum `error::Error`
--> rust/lancedb/src/job.rs:56:40
|
56 | Some(request_id) => Error::Http {
| ^^^^ variant not found in `error::Error`
error[E0599]: no variant named `Http` found for enum `error::Error`
--> rust/lancedb/src/job.rs:66:40
|
66 | Some(request_id) => Error::Http {
| ^^^^ variant not found in `error::Error`
Root cause
error.rs's Error::Http (and Error::Retry) variants are #[cfg(feature = "remote")]-gated.
job.rs's TerminalResult::decode matches on Error::Http { .. } in two places (lines 56
and 66) with no #[cfg(feature = "remote")] guard.
lib.rs:188 declares pub mod job; unconditionally (it is not itself gated behind remote), so job.rs is compiled for every feature combination, and the reference to the
remote-only Error::Http variant fails to resolve whenever remote is off.
Fails with the two E0599 errors above. This affects any downstream Rust consumer that
builds the crate without the remote feature (our case: a Go/CGo binding that pins default-features = false, features = ["metrics-otel"]).
v0.37.1 built fine under the same feature set; this is a regression introduced by the job.rs additions in this release cycle (e.g. #3742, #3755, #3939, #4013).
Suggested fix
The two Error::Http { .. } arms in TerminalResult::decode are only reachable when request_id is Some(..), which only happens via TerminalResult::remote(...). Gating
those two arms behind #[cfg(feature = "remote")] (with a #[cfg(not(feature = "remote"))]
fallback to Error::Runtime, matching the existing None => Error::Runtime { .. } arm)
should be enough to make job.rs compile cleanly without remote.
Environment
lancedb tag: v0.38.0
rustc 1.98.0
Cargo.toml: default-features = false, remote feature not enabled
Activity
chore(security): lancedb advisory in dependency-watch until 0.38.1 (#281
fix(rust): compile jobs without remote feature (#4103)