Skip to content
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

failed to resolve: use of undeclared crate or module tracing #2932

Closed
frederikhors opened this issue Sep 24, 2024 · 3 comments · Fixed by #2933
Closed

failed to resolve: use of undeclared crate or module tracing #2932

frederikhors opened this issue Sep 24, 2024 · 3 comments · Fixed by #2933
Labels

Comments

@frederikhors
Copy link

I'm getting this error:

error[E0433]: failed to resolve: use of undeclared crate or module `tracing`
   --> C:\Users\fred\.cargo\registry\src\index.crates.io-6f17d22bba15001f\axum-extra-0.9.4\src\typed_header.rs:161:9
    |
161 |         axum_core::__log_rejection!(rejection_type = Self, body_text = body, status = status,);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared crate or module `tracing`
    |
    = note: this error originates in the macro `axum_core::__log_rejection` (in Nightly builds, run with -Z macro-backtrace for more info)

Why?

@jplatte
Copy link
Member

jplatte commented Sep 24, 2024

Well, that's a bug, clearly. Could you share your (axum-related) dependencies from Cargo.toml?

@jplatte jplatte added C-bug Category: This is a bug. A-axum-extra labels Sep 24, 2024
@jplatte
Copy link
Member

jplatte commented Sep 24, 2024

Actually I already know what's up. Will have a fix ready shortly. What you can do for now is making sure that the tracing feature of axum-extra is enabled (assuming you want to have rejections logged) or making sure that the tracing feature is disabled for all the axum crates.

@jplatte
Copy link
Member

jplatte commented Sep 27, 2024

Fix has been released in axum-core v0.4.5!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants