Skip to content

job.rs references Error::Http unconditionally though the variant is remote-gated — fails to compile without the "remote" feature #4096

Closed

Description

@hellower

Summary

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.

Reproduction

[dependencies]
lancedb = { git = "https://github.com/lancedb/lancedb.git", tag = "v0.38.0", default-features = false }
cargo build -p lancedb

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

  1. added a commit that references this issue on Oct 24, 2026
    0ea932d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions