-
Notifications
You must be signed in to change notification settings - Fork 734
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
Generated #[instrument]
code is not qualified to the tracing
crate
#3119
Comments
Could you please provide a minimal reproducible Cargo project? That would help others reproduce the issue. |
heaths
added a commit
to heaths/tracing
that referenced
this issue
Oct 30, 2024
Avoid ambiguities with any user-defined `tracing` modules by globally qualifying types used in the attribute-generated code e.g., `::tracing::Level`. Fixes: tokio-rs#3119
This was referenced Oct 30, 2024
heaths
added a commit
to heaths/tracing
that referenced
this issue
Oct 30, 2024
Avoid ambiguities with any user-defined `tracing` modules by globally qualifying types used in the attribute-generated code e.g., `::tracing::Level`. Fixes: tokio-rs#3119
I opened 2 PRs: 1 each against |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
Version
tracing
0.1.40Platform
Darwin Mac.localdomain 24.0.0 Darwin Kernel Version 24.0.0: Tue Sep 24 23:38:45 PDT 2024; root:xnu-11215.1.12~1/RELEASE_ARM64_T8122 arm64
Crates
tracing
Description
I created a
tracing
module in my crate to add a bunch of helpers for my use of thetracing
crate. Probably not the best idea, but technical should work and naming is hard. I changed imports touse ::tracing::{instrument, Level}
but then I was getting compiler errors like:If I rename my crate to something else - leaving the
tracing
crate import as either::tracing
ortracing
, the generated code compiles fine. Perhaps the generated code should be emitting::tracing
as the prefix to avoid conflicts?The text was updated successfully, but these errors were encountered: