Skip to content

Let the tracing label go away with the feature - #172

Closed
jeremy wants to merge 1 commit into
mainfrom
rust-trace-label-feature
Closed

jeremy wants to merge 1 commit into
mainfrom
rust-trace-label-feature

Conversation

@jeremy

@jeremy jeremy commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

main fails make rs-check (Rust Tests red at 5680b25) since #165 met the --no-default-features clippy pass that landed with the CI hardening: trace::label, is_raw and the OperationInfo import exist only to name spans and events, and without the tracing feature the event macros expand to nothing, so nothing asks for the label and clippy's -D dead-code refuses the build. All three, and the import in client.rs, now go away with the feature.

Three #[cfg] lines, no behaviour change. Every Rust PR rebased onto main fails the gate until this lands, so it goes ahead of #168 and #169.

Gate: make rs-check (default, --no-default-features, --all-features), on main + this commit, green.


Summary by cubic

Gates the tracing label helpers behind the tracing feature so --no-default-features builds pass clippy's dead-code check. No behavior change.

Written for commit 4035853. Summary will update on new commits.

Review in cubic

Copilot AI balanced review requested due to automatic review settings September 10, 2026 07:24
@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:26:54.000502Z 4035853 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 feature gates consistently remove dead tracing-only code without changing runtime behavior.

Pull request overview

Gates tracing-only helpers and imports so Rust builds cleanly without default features.

Changes:

  • Conditionally compiles tracing labels and related imports.
  • Preserves behavior when tracing is enabled.

[!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 tracing-only label code and imports.
rust/hey-sdk/src/client.rs Gates the tracing label import.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 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

Superseded — closing. The failure this fixed was real at 5680b25 (the first main after #165: Rust Tests red, because make rs-check's no-default-features target runs cargo clippy -p hey-sdk --all-targets --no-default-features --locked -- -D warnings and trace::label/is_raw/the OperationInfo import were dead without the feature), but #163/#166 landed the same three #[cfg(feature = "tracing")] lines on their way in. On beaf495 that command passes on a bare checkout, main's rollup is green, and this branch conflicts precisely because it re-applies what is already there.

No CI gap remains: make rs-check runs the no-default leg (rust/Makefile no-default-features, part of check) on both pull_request and push: main, and the build matrix also builds --no-default-features. The gap was the ordering — #165's CI ran before the leg existed — not a missing leg.

@jeremy jeremy closed this Sep 10, 2026
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