Feat/tracing optional#31
Merged
Merged
Conversation
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>
There was a problem hiding this comment.
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’stracingdependency optional behind a newtracingfeature (enabled by default). - Add no-op
debug!/info!/trace!/warn!/error!macros whentracingis disabled, so internal call sites continue to compile. - Gate
httpsig-hyper’s*Synctrait re-exports behind theblockingfeature.
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 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). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.