Skip to content

Gate the tracing label behind the tracing feature - #173

Closed
jeremy wants to merge 1 commit into
mainfrom
fix-tracing-dead-code
Closed

jeremy wants to merge 1 commit into
mainfrom
fix-tracing-dead-code

Conversation

@jeremy

@jeremy jeremy commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

Main has been red on Rust Tests since #165 merged: cargo clippy --no-default-features -D warnings fails on trace::label and trace::is_raw being dead and the label import in client.rs unused. Without the tracing feature the debug! macro expands to nothing, so the label(operation) in its arguments is never referenced.

#155 added that clippy step and #165 added the spans. Each was green on its own; #165's CI ran before #155 landed and it merged without a re-run.

The fix gates label behind the feature, folds the one-line is_raw helper into it so the OperationInfo import can go, and names label fully qualified at the three call sites the way they already name the macro, so the import line needs no cfg.

make rs-check rs-check-drift is green locally. #171 (the zizmor-action bump) inherits this failure through its merge commit and will need a rebase once this lands.


Summary by cubic

Fixes the cargo clippy --no-default-features -D warnings failure on main by gating the tracing label behind the tracing feature.

  • Folds the is_raw helper into label so the unused OperationInfo import goes away.
  • Names label fully qualified at call sites so the import line needs no cfg.

Written for commit 76144fe. Summary will update on new commits.

Review in cubic

Without the `tracing` feature the `debug!` macro expands to nothing, so the
`label(operation)` in its arguments is never referenced and clippy under
`--no-default-features` fails the build on a dead function and an unused
import. That step (#155) and the span work (#165) each passed CI on their own
and were merged within minutes of each other, which is how main went red.

`label` now exists only with the feature, its one-line `is_raw` helper is
folded in so the `OperationInfo` import can go, and the call sites name it
fully qualified the way they already name the macro, so the import line
needs no cfg of its own.
Copilot AI balanced review requested due to automatic review settings September 10, 2026 07:30
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-10T07:32:55.022505Z 76144fe PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are narrowly scoped to feature-gating and import hygiene and align with how the trace::debug! macro already compiles to nothing without the tracing feature.

Pull request overview

This PR fixes --no-default-features Clippy failures by ensuring tracing-only helpers aren’t compiled (or imported) when the tracing feature is disabled, while keeping the call sites uniform.

Changes:

  • Gate trace::label behind #[cfg(feature = "tracing")] and inline the former is_raw logic.
  • Remove the now-unneeded OperationInfo/label imports and reference label with a fully-qualified path at the (tracing) call sites.

[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

File summaries
File Description
rust/hey-sdk/src/trace.rs Gates label behind the tracing feature and removes the redundant is_raw helper/import.
rust/hey-sdk/src/client.rs Drops the label import and fully-qualifies crate::trace::label(...) within tracing debug calls.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@jeremy

jeremy commented Sep 10, 2026

Copy link
Copy Markdown
Member Author

Closing: #163 landed the same fix while this was open (label, is_raw and the import are gated behind the tracing feature on main, and main's Test workflow is green again). Rebasing this leaves only a spelling difference, not worth a PR.

@jeremy jeremy closed this Sep 10, 2026
@jeremy
jeremy deleted the fix-tracing-dead-code branch September 10, 2026 09:00
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.

2 participants