Skip to content

Fix compilation when tracing feature is disabled#721

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/fix-diskann-tracing-feature
Closed

Fix compilation when tracing feature is disabled#721
Copilot wants to merge 2 commits intomainfrom
copilot/fix-diskann-tracing-feature

Conversation

Copy link
Contributor

Copilot AI commented Feb 4, 2026

DiskANN 0.45.0 fails to compile with --no-default-features because tracing macros unconditionally reference the tracing crate.

Changes

diskann/src/tracing.rs

  • Added #[cfg(feature = "tracing")] guards to all macro definitions
  • Provided no-op implementations when feature is disabled:
    #[cfg(not(feature = "tracing"))]
    #[macro_export]
    macro_rules! tracked_error {
        ($($arg:tt)+) => {{}};
    }
  • Added stub debug! and trace! macros that expand to empty blocks
  • Re-export actual tracing::{debug, trace} when feature is enabled

diskann/src/graph/index.rs

  • Changed import from use tracing::{debug, trace} to use crate::tracing::{debug, trace}
  • Routes all tracing macro usage through the conditional implementations
Original prompt

This section details on the original issue you should resolve

<issue_title>[BUG] DiskANN 0.45.0 needs the tracing feature.</issue_title>
<issue_description>DiskANN version 0.45.0 does not compile if the tracing feature is disabled.</issue_description>

<agent_instructions>The macros in diskann/src/tracing.rs should compile to nothing if the tracing feature is not enabled. This should be a relatively simple change, but we need to expand our CI testing to ensure that our crates properly build with no features enabled.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: hildebrandmw <24898651+hildebrandmw@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix DiskANN compilation issue with tracing feature disabled Fix compilation when tracing feature is disabled Feb 4, 2026
Copilot AI requested a review from hildebrandmw February 4, 2026 20:49
@hildebrandmw
Copy link
Contributor

Closing in favor of #722 .

@hildebrandmw hildebrandmw deleted the copilot/fix-diskann-tracing-feature branch February 4, 2026 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] DiskANN 0.45.0 needs the tracing feature.

2 participants