Closed
Description
Problem
I am not sure if this is bug or a feature (if so, I would appreciate explanation of it)..
The question is about https://crates.io/crates/cargo-insta. From what I see (and what cargo tells me), it has only binary target, no lib / proc or anything like that.
Downloads/rust-cargo-insta/cargo-insta-0.16.0 is π¦ v0.16.0 via π¦ v1.44.0
β― cargo metadata --no-deps | jq '.packages[0].targets[]'
warning: please specify `--format-version` flag explicitly to avoid compatibility problems
{
"kind": [
"bin"
],
"crate_types": [
"bin"
],
"name": "cargo-insta",
"src_path": "/home/brain/Downloads/rust-cargo-insta/cargo-insta-0.16.0/src/main.rs",
"edition": "2018",
"doctest": false
}
Apparently specifying it in a dependencies section in Cargo.toml pulls it in and even compiles it, but I don't see any final binary (in target/) produced from that crate.
Steps
- Add
cargo-insta = "0.16"
into the[dependencies]
- Try to compile a project
Possible Solution(s)
- Show warning
- Abort with an error
Notes
Output of cargo version
: cargo 1.44.0
This is happening on Fedora 33 (x86_64) with rust/cargo provided by a distribution.