mozilla / grcov

Rust tool to collect and aggregate code coverage data for multiple source files
Mozilla Public License 2.0
1.15k stars 148 forks source link

Fails to build with `--locked` due to an old `time` crate version #1187

Open m4tx opened 1 week ago

m4tx commented 1 week ago

grcov fails to build with the recent versions of Rust nightly (tested with rustc 1.81.0-nightly (cf2df68d1 2024-07-01)) due to time-rs/time#681:

error[E0282]: type annotations needed for `Box<_>`
  --> /home/m4tx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.23/src/format_description/parse/mod.rs:83:9
   |
83 |     let items = format_items
   |         ^^^^^
...
86 |     Ok(items.into())
   |              ---- type must be known at this point
   |
help: consider giving `items` an explicit type, where the placeholders `_` are specified
   |
83 |     let items: Box<_> = format_items
   |              ++++++++

   Compiling thiserror-impl v1.0.43
   Compiling clap_derive v4.3.2
   Compiling chrono-tz v0.6.1
   Compiling globwalk v0.8.1
For more information about this error, try `rustc --explain E0282`.
error: could not compile `time` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `grcov v0.8.19`, intermediate artifacts can be found at `/tmp/cargo-installw35YGR`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Since the issue has been solved in time v0.3.36, it should be as easy as upgrading this one package in Cargo.lock (or running cargo update).