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

fix: use compatible tracing version #578

Merged

Conversation

stepantubanov
Copy link
Contributor

Seems like tracing changed public interface in tokio-rs/tracing#2212

And poem is using the new interface already, so it fails with tracing <= 0.1.35.

    Checking poem v1.3.55 (https://github.com/poem-web/poem.git?branch=master#9941b489)
error[E0277]: the size for values of type `str` cannot be known at compilation time
    --> /Users/stepantubanov/.cargo/git/checkouts/poem-5d35782906f249bc/9941b48/poem/src/middleware/tracing_mw.rs:50:41
     |
50   |             span.record("path_pattern", path_pattern.0.as_ref());
     |                  ------                 ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
     |                  |
     |                  required by a bound introduced by this call
     |
     = help: the trait `Sized` is not implemented for `str`
note: required by a bound in `Span::record`
    --> /Users/stepantubanov/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-0.1.35/src/span.rs:1194:30
     |
1194 |     pub fn record<Q: ?Sized, V>(&self, field: &Q, value: &V) -> &Self
     |                              ^ required by this bound in `Span::record`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `poem` due to previous error

@attila-lin attila-lin merged commit ba0cf6d into poem-web:master May 28, 2023
9 checks passed
@attila-lin
Copy link
Collaborator

Thanks!

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.

None yet

2 participants