Steps
- Create a package
my_package with a feature my_funky_feature:
# my_package/Cargo.toml
[package]
name = "my_package[features]my_funky_feature = []
- Create a copy of
my_package without the feature my_funky_feature:
# my_package_copy/Cargo.toml
[package]
name = "my_package[features]
- Create yet another package
my_bin, which depends on my_package, activates the feature my_funky_feature of it.
# my_bin/Cargo.toml
[package]
name = "my_bin"
[dependencies]
my_package = { git = "github.com/aiofwiewof/vioe", features = ["my_funky_feature"] } - Set the copy of
my_package which doesn't have my_funky_feature as patch for my_package.
# my_bin/Cargo.toml# [...]
[patch."github.com/aiofwiewof/vioe"]
my_package = { path = "../my_package_copy" } - Cargo silently uses the original
my_package without warning.
Possible Solution(s)
Give a warning when a patch is ignored, because there is a missing feature.
Notes
Output of cargo version:
cargo 1.33.0-nightly (2cf1f5dda 2018-12-11)
Steps
my_packagewith a featuremy_funky_feature:my_packagewithout the featuremy_funky_feature:my_bin, which depends onmy_package, activates the featuremy_funky_featureof it.my_packagewhich doesn't havemy_funky_featureas patch formy_package.my_packagewithout warning.Possible Solution(s)
Give a warning when a patch is ignored, because there is a missing feature.
Notes
Output of
cargo version: