Skip to content

Feat/tracing optional#31

Merged
junkurihara merged 2 commits into
developfrom
feat/tracing-optional
Jul 22, 2026
Merged

Feat/tracing optional#31
junkurihara merged 2 commits into
developfrom
feat/tracing-optional

Conversation

@junkurihara

Copy link
Copy Markdown
Owner

No description provided.

junkurihara and others added 2 commits July 22, 2026 22:43
Supersedes #30. The `tracing` dependency of the `httpsig` crate is now
gated behind a new `tracing` feature, enabled by default so that existing
users keep their log output.

Unlike #30, log call sites are left untouched: the `trace` facade module
now provides no-op macros when the feature is disabled, so a missing cfg
guard can never break a feature combination (#30 failed to compile with
`--features rsa-signature` alone). The dependency is also declared with
`default-features = false`, which drops `tracing-attributes` from the
dependency graph since only the bang-style macros are used.

Verified: cargo check/test across default, --no-default-features,
rsa-signature with and without tracing, --all-features, and the whole
workspace.

Co-authored-by: keskalukasfri <270303466+keskalukasfri@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 22, 2026 13:46
@junkurihara
junkurihara merged commit f8ab161 into develop Jul 22, 2026
3 checks passed

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.

Pull request overview

This PR makes httpsig’s tracing integration feature-gated (with no-op fallbacks when disabled) while preserving existing default behavior, and tightens httpsig-hyper’s public re-exports to match its blocking feature.

Changes:

  • Make httpsig’s tracing dependency optional behind a new tracing feature (enabled by default).
  • Add no-op debug!/info!/trace!/warn!/error! macros when tracing is disabled, so internal call sites continue to compile.
  • Gate httpsig-hyper’s *Sync trait re-exports behind the blocking feature.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
httpsig/src/trace.rs Adds conditional tracing/no-op macro exports so logging calls compile with tracing disabled.
httpsig/Cargo.toml Introduces a tracing feature and makes the tracing dependency optional (default-on).
httpsig-hyper/src/lib.rs Re-exports blocking sync traits only when the blocking feature is enabled.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread httpsig/src/trace.rs
Comment on lines +8 to +9
/// `warn` is defined as `warn_` and re-exported, since a macro named
/// `warn` conflicts with the built-in `warn` attribute (E0659).
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