The simple dependency is used by the feature1 feature, and the empty dependency is unused by all features. Can we add a configuration that is a midway between disabling all optional dependencies and enabling all optional dependencies, to only check the unused optional dependencies?
It's roughly the equivalent of adding empty = [] or empty = ["dep:empty"] to the configuration.
The rationale behind this is that optional dependencies that are used by features are probably not meant to be consumed as features, while optional dependencies that are unused are probably used in the code as [cfg(feature = "empty")] (otherwise, why are they there?).
This isn't certain, so I suggest leaving this to the user to configure whether to make this assumption or not.
The
simple
dependency is used by thefeature1
feature, and theempty
dependency is unused by all features. Can we add a configuration that is a midway between disabling all optional dependencies and enabling all optional dependencies, to only check the unused optional dependencies? It's roughly the equivalent of addingempty = []
orempty = ["dep:empty"]
to the configuration.The rationale behind this is that optional dependencies that are used by features are probably not meant to be consumed as features, while optional dependencies that are unused are probably used in the code as
[cfg(feature = "empty")]
(otherwise, why are they there?). This isn't certain, so I suggest leaving this to the user to configure whether to make this assumption or not.