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

Example code won't build with log = "0.4.14" #787

Closed
lichr opened this issue Jan 27, 2021 · 4 comments · Fixed by #776
Closed

Example code won't build with log = "0.4.14" #787

lichr opened this issue Jan 27, 2021 · 4 comments · Fixed by #776

Comments

@lichr
Copy link

lichr commented Jan 27, 2021

just tried to run the "get started" example and it failed to build, with error like

error[E0277]: the trait bound `std::string::String: ToValue` is not satisfied
   --> /home/cli/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/tide-0.15.0/src/listener/failover_listener.rs:112:21
    |
112 | /                     crate::log::info!("unable to bind", {
113 | |                         listener: listener.to_string(),
114 | |                         error: e.to_string()
115 | |                     });
    | |_______________________^ the trait `ToValue` is not implemented for `std::string::String`
    |
    = note: required for the cast to the object type `dyn ToValue`
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

Look like the latest log 0.4.14 which was installed by default causes the problem, have to explicitly specify using the previous version so that it can build

# this works
log = "=0.4.13"
@etherealvisage
Copy link

Also just ran into this, looks like the problem is that log 0.4.14 moved the implementation of ToValue for String into the kv_unstable_std feature instead of the std feature. I think this counts as an upstream bug?

@pepoviola
Copy link
Contributor

I also run into this issue in a ci build today. @yoshuawuyts can we lock the version to workaround on the upstream issue?

Thx!

@yoshuawuyts
Copy link
Member

Sounds good. If you can file a PR I can merge + issue a patch release tomorrow morning (a few hours from now)

probably cc/ @KodrAus as well

@pepoviola
Copy link
Contributor

Hi @yoshuawuyts, thanks for the reply. This pr fix this issue. I will resolve the conflicts and ping you there.
Thx!

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 a pull request may close this issue.

3 participants