Skip to content

fix(examples): add missing tracing requirements - #95

Open
qiuqiuaiweb3 wants to merge 1 commit into
Polymarket:mainfrom
qiuqiuaiweb3:audit/f13b-example-required-features
Open

fix(examples): add missing tracing requirements#95
qiuqiuaiweb3 wants to merge 1 commit into
Polymarket:mainfrom
qiuqiuaiweb3:audit/f13b-example-required-features

Conversation

@qiuqiuaiweb3

@qiuqiuaiweb3 qiuqiuaiweb3 commented Jul 20, 2026

Copy link
Copy Markdown

Summary

  • Add tracing to the declared required-features of nine examples that import it unconditionally.
  • Keep Cargo from selecting those examples under incomplete clob, clob,ws, or clob,rfq feature sets.
  • Change no example source, dependency, lockfile, public API, or runtime behavior.

Reproduction and cause

On current main (222143d321eba97d5711a848265eb9aab3bc7ff4), the affected examples fail with E0432: unresolved import tracing when checked with their currently declared features. The nine targets are:

  • async, authenticated, aws_authenticated, and builder_authenticated under clob;
  • websocket_orderbook, websocket_user, and websocket_unsubscribe under clob,ws;
  • rfq_quotes and rfq_requests under clob,rfq.

Each source imports tracing unconditionally, but tracing is an optional dependency and none of those three base feature groups enables it. The existing default checks skip these examples, while all-feature checks enable tracing and mask the manifest gap.

PR #80 previously documented this separate issue while leaving it out of its rustls-provider diff. This PR only implements the isolated manifest correction.

Verification

I reproduced all nine failures on both current main and a fresh crates.io 0.7.0 extraction. Adding tracing made all 18 controls compile. With this patch:

  • Cargo metadata declares tracing for all nine targets;
  • the incomplete explicit commands are rejected by Cargo with target requires ... tracing instead of reaching rustc;
  • all nine complete feature combinations compile on both baselines;
  • aggregate clob,ws,rfq check/test, default tests, all-target/all-feature build, both strict clippy configurations, pinned-nightly formatting, cargo-sort, coverage, and all pre-commit hooks pass.

I used an AI coding assistant to help reproduce the matrix, prepare the manifest-only patch, and run verification. I reviewed the final diff and this description.


Note

Low Risk
Cargo manifest alignment only; no runtime, security, or public API impact.

Overview
Manifest-only fix: nine [[example]] targets in Cargo.toml now list tracing alongside their existing feature sets (clob, clob,ws, or clob,rfq).

Those examples already import tracing unconditionally while tracing stays an optional crate feature not pulled in by clob, ws, or rfq alone. Without this change, building with only those feature groups could hit E0432: unresolved import tracing; Cargo should now refuse incomplete feature sets instead of compiling broken example targets.

No example sources, dependencies, lockfile, or library API behavior change.

Reviewed by Cursor Bugbot for commit 387a254. Bugbot is set up for automated code reviews on this repo. Configure here.

@qiuqiuaiweb3
qiuqiuaiweb3 marked this pull request as ready for review July 21, 2026 02:45
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.

1 participant