-
Notifications
You must be signed in to change notification settings - Fork 717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tracing: fix name clash inside of tracing macros #806
Conversation
This commit fixes name clashes that occured inside of tracing macros when values with the names display,Value,debug have been used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change looks good to me.
If you like, I think it might be good to add the repro from #805 as a test to ensure that there aren't regressions in the future.
Also, a couple procedural notes: can we change the PR title to start with the crate that the change applies to (in this case, "tracing:") rather than "fix:", and add "Fixes #805" to the commit message somewhere? CONTRIBUTING.md has documentation on the preferred convention for commit message/PRs. Not a big deal, of course, just thought I'd mention.
I can do that. Should I just force-push the changes to this PR? Thanks for mentioning the contributions.md. I actually didn't see it 😄 |
You don't need to force push, just edit the PR name and description. We'll squash the whole PR down to one commit when merging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Done. |
This reverts commit e3b3a3a. This change was accidentally semver-incompatible, as user code was able to use the imported `debug` and `display` functions without adding an import outside the macro. Although this was not documented, downstream code relied on these names being available, so this resulted in a breaking change in a point release. Fixes #820
This reverts commit e3b3a3a. This change was accidentally semver-incompatible, as user code was able to use the imported `debug` and `display` functions without adding an import outside the macro. Although this was not documented, downstream code relied on these names being available, so this resulted in a breaking change in a point release. Fixes #820
This commit fixes name clashes that occurred inside of tracing macros when values with the names
display, Value and debug
have been used.Motivation
This allows library users to trace variables that have the same name as imported types inside the
tracing::field
module.Solution
Use fully qualified type names for types used inside the
tracing::field
module.Related issues/PRs
Fixes #805.