Skip to content

fix: gate tracing target constant imports behind cfg(feature = "tracing") - #2873

Merged
oferchen merged 2 commits into
masterfrom
fix/tracing-unused-imports
Mar 21, 2026
Merged

oferchen merged 2 commits into
masterfrom
fix/tracing-unused-imports

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Gate DELTASUM_TARGET and RECV_TARGET imports behind #[cfg(feature = "tracing")] in three engine debug trace submodules
  • These constants are only used inside #[cfg(feature = "tracing")] function bodies, causing unused import errors on builds without the tracing feature

Root Cause

Builds without the tracing feature (Linux musl, no-default-features, async, concurrent-sessions feature flag combinations) fail with:

error: unused import: `super::DELTASUM_TARGET`
error: unused import: `super::RECV_TARGET`

This is a pre-existing build failure on master affecting all open PRs.

Files Changed

  • crates/engine/src/local_copy/debug_deltasum/checksum.rs - cfg-gate DELTASUM_TARGET import
  • crates/engine/src/local_copy/debug_deltasum/matching.rs - cfg-gate DELTASUM_TARGET import
  • crates/engine/src/local_copy/debug_recv/trace_functions.rs - cfg-gate RECV_TARGET import

Test plan

  • cargo check -p engine --no-default-features passes locally
  • cargo check -p engine --features tracing passes locally
  • CI: Linux musl builds pass
  • CI: Feature flag combination builds pass

…ng")

DELTASUM_TARGET and RECV_TARGET are only used inside #[cfg(feature =
"tracing")] function bodies. Without the feature gate on the imports,
builds without tracing (musl, no-default-features, async,
concurrent-sessions) fail with unused import errors under -D warnings.
…feature

The `pub use pool::ConnectionPool` re-export triggers unused import
errors when compiled without the concurrent-sessions feature flag.
Add `#[allow(unused_imports)]` to match the existing pattern for
the types re-export on the next line.
@github-actions github-actions Bot added the bug Something isn't working label Mar 21, 2026
@oferchen
oferchen merged commit 1457f68 into master Mar 21, 2026
9 checks passed
@oferchen
oferchen deleted the fix/tracing-unused-imports branch March 21, 2026 14:15
oferchen added a commit that referenced this pull request May 1, 2026
…ng") (#2873)

* fix: gate tracing target constant imports behind cfg(feature = "tracing")

DELTASUM_TARGET and RECV_TARGET are only used inside #[cfg(feature =
"tracing")] function bodies. Without the feature gate on the imports,
builds without tracing (musl, no-default-features, async,
concurrent-sessions) fail with unused import errors under -D warnings.

* fix: suppress unused ConnectionPool import under concurrent-sessions feature

The `pub use pool::ConnectionPool` re-export triggers unused import
errors when compiled without the concurrent-sessions feature flag.
Add `#[allow(unused_imports)]` to match the existing pattern for
the types re-export on the next line.
oferchen added a commit that referenced this pull request May 5, 2026
…ng") (#2873)

* fix: gate tracing target constant imports behind cfg(feature = "tracing")

DELTASUM_TARGET and RECV_TARGET are only used inside #[cfg(feature =
"tracing")] function bodies. Without the feature gate on the imports,
builds without tracing (musl, no-default-features, async,
concurrent-sessions) fail with unused import errors under -D warnings.

* fix: suppress unused ConnectionPool import under concurrent-sessions feature

The `pub use pool::ConnectionPool` re-export triggers unused import
errors when compiled without the concurrent-sessions feature flag.
Add `#[allow(unused_imports)]` to match the existing pattern for
the types re-export on the next line.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant