cargo icon indicating copy to clipboard operation
cargo copied to clipboard

Cargo should strip features of dev dependencies

Open Morganamilo opened this issue 1 year ago • 2 comments

Problem

https://github.com/rust-lang/cargo/pull/7333 added stripping of dependencies, but did not strip features pointing to those dependencies.

This causes a rather unintuitive error where cargo says the dependency does not exist. Which one would only understand if they knew about the stripping that cargo does.

Proposed Solution

Cargo should also strip these features from the manifest before publishing.

If foo is a dev-dependency being stripping then a = ["foo/a"] should be transformed to a = [].

Notes

No response

Morganamilo avatar Jun 02 '23 17:06 Morganamilo

@rustbot claim

eval-exec avatar Jun 04 '23 09:06 eval-exec

Hello, I submitted a PR to fix this。 Would you like review my PR and provide your feedback? :heart_decoration:

eval-exec avatar Jun 04 '23 10:06 eval-exec

@rustbot claim

I'm going to try, and if I haven't moved for a long time, feel free to pick it up and continue.

linyihai avatar Feb 21 '24 07:02 linyihai