Description
Five crates (zeph-scheduler, zeph-orchestration) repeat the pattern:
#[allow(unused_imports)]
use zeph_db::sql; // or pub(crate) use zeph_db::sql;
This is a workaround for sql! being a #[macro_export] defined under both #[cfg(feature = "sqlite")] and #[cfg(feature = "postgres")], but the Rust compiler still warns about the use being unused when neither feature is active.
Affected Files
crates/zeph-scheduler/src/lib.rs:80
crates/zeph-scheduler/src/store.rs:5
crates/zeph-scheduler/src/scheduler.rs:7
crates/zeph-orchestration/src/lib.rs:69
crates/zeph-orchestration/src/plan_cache.rs:16
Expected Behavior
Either:
- Wrap each
use zeph_db::sql in #[cfg(any(feature = "sqlite", feature = "postgres"))], or
- Re-export
sql! from zeph-db under a single #[cfg(any(...))] attribute so importing it never triggers the warning.
Avoids suppressing a potentially real diagnostic with allow(unused_imports).
Environment
Description
Five crates (
zeph-scheduler,zeph-orchestration) repeat the pattern:This is a workaround for
sql!being a#[macro_export]defined under both#[cfg(feature = "sqlite")]and#[cfg(feature = "postgres")], but the Rust compiler still warns about theusebeing unused when neither feature is active.Affected Files
crates/zeph-scheduler/src/lib.rs:80crates/zeph-scheduler/src/store.rs:5crates/zeph-scheduler/src/scheduler.rs:7crates/zeph-orchestration/src/lib.rs:69crates/zeph-orchestration/src/plan_cache.rs:16Expected Behavior
Either:
use zeph_db::sqlin#[cfg(any(feature = "sqlite", feature = "postgres"))], orsql!fromzeph-dbunder a single#[cfg(any(...))]attribute so importing it never triggers the warning.Avoids suppressing a potentially real diagnostic with
allow(unused_imports).Environment