What happened to logger 0.0.3?


#1

I have a project that I’m pretty sure compiled on stable rustc just fine a few days ago, but today after cargo update && cargo build I get this from logger:

$ cargo run
   Compiling serde_codegen v0.6.9
   Compiling logger v0.0.3
<std macros>:6:1: 6:32 error: the trait `core::convert::From<term::Error>` is not implemented for the type `std::io::error::Error` [E0277]
<std macros>:6 $ crate:: convert:: From:: from ( err ) ) } } )
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/vesakaihlavirta/.multirust/toolchains/stable/cargo/registry/src/github.com-0a35038f75765ae4/logger-0.0.3/src/lib.rs:80:57: 80:75 note: in this expansion of try! (defined in <std macros>)
<std macros>:6:1: 6:32 help: run `rustc --explain E0277` to see a detailed explanation
<std macros>:6:1: 6:32 note: required by `core::convert::From::from`
<std macros>:6:1: 6:32 error: the trait `core::convert::From<term::Error>` is not implemented for the type `std::io::error::Error` [E0277]
<std macros>:6 $ crate:: convert:: From:: from ( err ) ) } } )
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/vesakaihlavirta/.multirust/toolchains/stable/cargo/registry/src/github.com-0a35038f75765ae4/logger-0.0.3/src/lib.rs:83:46: 83:64 note: in this expansion of try! (defined in <std macros>)
<std macros>:6:1: 6:32 help: run `rustc --explain E0277` to see a detailed explanation
<std macros>:6:1: 6:32 note: required by `core::convert::From::from`
<std macros>:6:1: 6:32 error: the trait `core::convert::From<term::Error>` is not implemented for the type `std::io::error::Error` [E0277]
<std macros>:6 $ crate:: convert:: From:: from ( err ) ) } } )
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/vesakaihlavirta/.multirust/toolchains/stable/cargo/registry/src/github.com-0a35038f75765ae4/logger-0.0.3/src/lib.rs:90:33: 90:52 note: in this expansion of try! (defined in <std macros>)
<std macros>:6:1: 6:32 help: run `rustc --explain E0277` to see a detailed explanation
<std macros>:6:1: 6:32 note: required by `core::convert::From::from`
<std macros>:6:1: 6:32 error: the trait `core::convert::From<term::Error>` is not implemented for the type `std::io::error::Error` [E0277]
<std macros>:6 $ crate:: convert:: From:: from ( err ) ) } } )
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/vesakaihlavirta/.multirust/toolchains/stable/cargo/registry/src/github.com-0a35038f75765ae4/logger-0.0.3/src/lib.rs:95:33: 95:52 note: in this expansion of try! (defined in <std macros>)
<std macros>:6:1: 6:32 help: run `rustc --explain E0277` to see a detailed explanation
<std macros>:6:1: 6:32 note: required by `core::convert::From::from`
<std macros>:6:1: 6:32 error: the trait `core::convert::From<term::Error>` is not implemented for the type `std::io::error::Error` [E0277]
<std macros>:6 $ crate:: convert:: From:: from ( err ) ) } } )
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/vesakaihlavirta/.multirust/toolchains/stable/cargo/registry/src/github.com-0a35038f75765ae4/logger-0.0.3/src/lib.rs:100:21: 100:37 note: in this expansion of try! (defined in <std macros>)
<std macros>:6:1: 6:32 help: run `rustc --explain E0277` to see a detailed explanation
<std macros>:6:1: 6:32 note: required by `core::convert::From::from`
/Users/vesakaihlavirta/.multirust/toolchains/stable/cargo/registry/src/github.com-0a35038f75765ae4/logger-0.0.3/src/lib.rs:99:42: 99:60 error: lifetime bound not satisfied [E0478]
/Users/vesakaihlavirta/.multirust/toolchains/stable/cargo/registry/src/github.com-0a35038f75765ae4/logger-0.0.3/src/lib.rs:99                     try!(write!(t, "{}", render(&unit.text)));
                                                                                                                                                                       ^~~~~~~~~~~~~~~~~~
<std macros>:2:21: 2:52 note: in this expansion of format_args!
/Users/vesakaihlavirta/.multirust/toolchains/stable/cargo/registry/src/github.com-0a35038f75765ae4/logger-0.0.3/src/lib.rs:99:26: 99:61 note: in this expansion of write! (defined in <std macros>)
/Users/vesakaihlavirta/.multirust/toolchains/stable/cargo/registry/src/github.com-0a35038f75765ae4/logger-0.0.3/src/lib.rs:99:21: 99:63 note: in this expansion of try! (defined in <std macros>)
/Users/vesakaihlavirta/.multirust/toolchains/stable/cargo/registry/src/github.com-0a35038f75765ae4/logger-0.0.3/src/lib.rs:59:72: 119:6 note: lifetime parameter instantiated with the anonymous lifetime #4 defined on the block at 59:71
/Users/vesakaihlavirta/.multirust/toolchains/stable/cargo/registry/src/github.com-0a35038f75765ae4/logger-0.0.3/src/lib.rs:59     fn log(&self, req: &mut Request, res: &Response) -> IronResult<()> {
/Users/vesakaihlavirta/.multirust/toolchains/stable/cargo/registry/src/github.com-0a35038f75765ae4/logger-0.0.3/src/lib.rs:60         let exit_time = time::precise_time_ns();
/Users/vesakaihlavirta/.multirust/toolchains/stable/cargo/registry/src/github.com-0a35038f75765ae4/logger-0.0.3/src/lib.rs:61         let entry_time = *req.extensions.get::<StartTime>().unwrap();
/Users/vesakaihlavirta/.multirust/toolchains/stable/cargo/registry/src/github.com-0a35038f75765ae4/logger-0.0.3/src/lib.rs:62
/Users/vesakaihlavirta/.multirust/toolchains/stable/cargo/registry/src/github.com-0a35038f75765ae4/logger-0.0.3/src/lib.rs:63         let response_time_ms = (exit_time - entry_time) as f64 / 1000000.0;
/Users/vesakaihlavirta/.multirust/toolchains/stable/cargo/registry/src/github.com-0a35038f75765ae4/logger-0.0.3/src/lib.rs:64         let Format(format) = self.format.clone().unwrap_or_default();
                                                                                                                              ...
/Users/vesakaihlavirta/.multirust/toolchains/stable/cargo/registry/src/github.com-0a35038f75765ae4/logger-0.0.3/src/lib.rs:59:72: 119:6 note: but lifetime parameter must outlive the anonymous lifetime #3 defined on the block at 59:71
/Users/vesakaihlavirta/.multirust/toolchains/stable/cargo/registry/src/github.com-0a35038f75765ae4/logger-0.0.3/src/lib.rs:59     fn log(&self, req: &mut Request, res: &Response) -> IronResult<()> {
/Users/vesakaihlavirta/.multirust/toolchains/stable/cargo/registry/src/github.com-0a35038f75765ae4/logger-0.0.3/src/lib.rs:60         let exit_time = time::precise_time_ns();
/Users/vesakaihlavirta/.multirust/toolchains/stable/cargo/registry/src/github.com-0a35038f75765ae4/logger-0.0.3/src/lib.rs:61         let entry_time = *req.extensions.get::<StartTime>().unwrap();
/Users/vesakaihlavirta/.multirust/toolchains/stable/cargo/registry/src/github.com-0a35038f75765ae4/logger-0.0.3/src/lib.rs:62
/Users/vesakaihlavirta/.multirust/toolchains/stable/cargo/registry/src/github.com-0a35038f75765ae4/logger-0.0.3/src/lib.rs:63         let response_time_ms = (exit_time - entry_time) as f64 / 1000000.0;
/Users/vesakaihlavirta/.multirust/toolchains/stable/cargo/registry/src/github.com-0a35038f75765ae4/logger-0.0.3/src/lib.rs:64         let Format(format) = self.format.clone().unwrap_or_default();
                                                                                                                              ...
error: aborting due to 6 previous errors
Build failed, waiting for other jobs to finish...
Could not compile `logger`.

To learn more, run the command again with --verbose.

$ rustc --version
rustc 1.5.0 (3d7cd77e4 2015-12-04)

Any idea what happened and how should I fix it? Logger hasn’t been updated in months, so it does not seem like it has broken. But then again, rustc hasn’t changed since December either, so what’s happening? :slight_smile:


#2

The logger crate has wildcard constraints on its dependencies, so a version bump of term may have removed the From implementation that logger depends on.


#3

Well, of course. Silly of me.

I’ll file an issue against logger :slight_smile:


#4

Perhaps somehow related to the problem, cargo update works weirdly for my project. For every run, it tries to update term and traitobject projects, and it keeps changing their versions between 0.2.14/0.4.0 for term and 0.0.1/0.0.3 for traitobject.