rust-cli / env_logger

A logging implementation for `log` which is configured via an environment variable.
https://docs.rs/env_logger
Apache License 2.0
797 stars 124 forks source link

compile error in `BufferWriter::pipe` #242

Closed matthme closed 1 year ago

matthme commented 1 year ago

Since the version bump 30 minutes ago I get this error when compiling env_logger as secondary dependency in my project

error[E0061]: this function takes 3 arguments but 2 arguments were supplied
   --> /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/env_logger-0.9.2/src/fmt/writer/mod.rs:196:43
    |
196 |             WritableTarget::Pipe(pipe) => BufferWriter::pipe(color_choice, pipe),
    |                                           ^^^^^^^^^^^^^^^^^^ ------------ an argument of type `bool` is missing
    |
note: associated function defined here
   --> /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/env_logger-0.9.2/src/fmt/writer/termcolor/shim_impl.rs:26:35
    |
26  |     pub(in crate::fmt::writer) fn pipe(
    |                                   ^^^^
27  |         _is_test: bool,
    |         --------------
28  |         _write_style: WriteStyle,
    |         ------------------------
29  |         pipe: Box<Mutex<dyn io::Write + Send + 'static>>,
    |         ------------------------------------------------
help: provide the argument
    |
196 |             WritableTarget::Pipe(pipe) => BufferWriter::pipe(/* bool */, color_choice, pipe),
    |                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

May it have been in fact a breaking change?

The crates inferno and bindgen seem to depend on env_logger in my project in case that helps.

jplatte commented 1 year ago

Oops. Short-term fix is enabling the termcolor feature. @epage are you gonna do the next release now I've removed myself from the org or do you want to re-add me to fix this one? 😬

epage commented 1 year ago

Added you back as I'm on family leave at the moment and my availability for doing stuff is very sporadic until I'm back.

jplatte commented 1 year ago

Fix released in v0.9.3.