Closed sksat closed 6 months ago
In Rust 1.77.0 project, cargo clippy --message-format json | clippy-reviewdog-filter panicked by I/O error when reading input: Custom { kind: InvalidData, error: Error("missing fieldversion", line: 0, column: 0) }.
cargo clippy --message-format json | clippy-reviewdog-filter
I/O error when reading input: Custom { kind: InvalidData, error: Error("missing field
", line: 0, column: 0) }
.package_id format changed like below. Rust 1.76.0: "package_id": "registry+https://github.com/rust-lang/crates.io-index#libc@0.2.150", Rust 1.77.0: "package_id": "libc 0.2.150 (registry+https://github.com/rust-lang/crates.io-index)",
.package_id
"package_id": "registry+https://github.com/rust-lang/crates.io-index#libc@0.2.150",
"package_id": "libc 0.2.150 (registry+https://github.com/rust-lang/crates.io-index)",
It comes from Package Id Spec stabilization (ref: https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-177-2024-03-21).
To solve this problem, I think following deserialize strategies seem to exist.
cargo-util-schemas crate could be useful!
cargo-util-schemas
https://docs.rs/cargo-util-schemas/latest/cargo_util_schemas/core/struct.PackageIdSpec.html https://github.com/rust-lang/cargo/blob/e52e360061cacbbeac79f7f1215a7a90b6f08442/src/cargo/core/mod.rs#L17
In Rust 1.77.0 project,
cargo clippy --message-format json | clippy-reviewdog-filter
panicked byI/O error when reading input: Custom { kind: InvalidData, error: Error("missing field
version", line: 0, column: 0) }
..package_id
format changed like below. Rust 1.76.0:"package_id": "registry+https://github.com/rust-lang/crates.io-index#libc@0.2.150",
Rust 1.77.0:"package_id": "libc 0.2.150 (registry+https://github.com/rust-lang/crates.io-index)",
It comes from Package Id Spec stabilization (ref: https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-177-2024-03-21).