dnaka91/llvm-cov-pretty

missing field `cargo_args`

Closed this issue · 2 comments

Describe the bug

I'm getting the error below when running this command:

cargo llvm-cov --features mocks --json | llvm-cov-pretty
Error: 
   0: failed parsing report data from STDIN
   1: missing field `cargo_args` at line 1 column 44038817

Note: JSON path: cargo_llvm_cov

Expected behavior

Report should be generated without any errors

To reproduce

No response

What operating system are you using?

Linux

Terminal output

No response

Additional context

llvm-cov-pretty 0.1.8
cargo-llvm-cov 0.5.33

CargoLlvmCov struct has version, manifest_path, cargo_args, and test_args fields, but cargo-llvm-cov actually has only version and manifest_path fields. (taiki-e/cargo-llvm-cov@1ea8be4)

pub struct CargoLlvmCov {
/// The version that was used. More reliable than invoking cargo-llvm-cov ourselves, as it may
/// have changed in the meantime (in case of a local file), or simply being a different one due
/// to path resolution.
pub version: Version,
/// The project's manifest path, as resolved by cargo-llvm-cov. Avoids a mismatch as a
/// user-provided path has to be passed to both tools.
pub manifest_path: Utf8PathBuf,
/// Additional arguments passed to Cargo.
pub cargo_args: Vec<String>,
/// additional arguments passed to the Cargo test run.
pub test_args: Vec<String>,

Sorry, I was experimenting with those fields when I added this feature to cargo-llvm-cov and forgot to remove them later on. Still worked for me because of a custom build that took precedence over the global installation.

I removed those fields in the latest v1.0.9, should work now.