Closed loynoir closed 1 month ago
You can still add the relevant dev-dependency
manually to Cargo.toml
, e.g.
[dev-dependencies]
XXX = { path = ".", features = ["foo"] }
Any equivalent in new cargo?
I don't know think cargo
's version of cargo add
ever worked for this use-case; the line you quoted was added when cargo add
became part of cargo
. cargo add
was added in Rust 1.62.0, and this doesn't work using that version either. I'm not sure if this worked in cargo-edit
's version of cargo add
prior to it being added to cargo
itself.
I use channel = "nightly-2024-08-28"
yesterday.
Around one week ago, line did add to Cargo.toml
.
xxx = { workspace = true, features = ["testing_counter"] }
Update toolchain to channel = "nightly-2024-09-15"
yesterday.
No idea what happen.
Problem
Previously, I use
self dev dependency
to activate testing only features.But, now
self dev dependency
seems not workinghttps://github.com/rust-lang/cargo/blob/eaee77dc1584be45949b75e4c4c9a841605e3a4b/src/cargo/ops/cargo_add/mod.rs#L125
Any equivalent in new cargo?
Steps
No response
Possible Solution(s)
No response
Notes
No response
Version
cargo 1.83.0-nightly (c1fa840a8 2024-08-29)