When building deps there may be requirements to disable optional functionality that's enabled by default. The upstream means of doing this [1] --no-default-features and then selecting explicit features you need explicitly enabled by adding --features "foo bar" but while the --features option is supported in cargo-inspector the --no-default-features is not which means you need to manually hack the metadata to achieve the same.
[1] https://github.com/behnam/rust-cargo/blob/3f5ca7b53f2fbf098dc6b60069fc1335b81727af/src/doc/manifest.md#usage-in-end-products
Isn't this already supported? The macros make me think it is: https://pagure.io/fedora-rust/rust2rpm/blob/master/f/data/macros.cargo#_45
Though I do not know if it works, as I have never needed to use it.
Not at least with the version in Fedora:
$ cargo-inspector -BR --no-default-features --features "chrono_crate serde_json" usage: cargo-inspector [-h] (-n | -v | -rv | -t | -l | -P | -R | -BR | -TR) [-a | -f FEATURES] [file ...] cargo-inspector: error: unrecognized arguments: --no-default-features $ rpm -qf /usr/bin/cargo-inspector python3-rust2rpm-18-1.fc34.x86_64
Hrm, okay. Looks like all other macros support the -n argument, but cargo-inspector does not. So you're right, that's definitely a missing feature.
-n
Metadata Update from @decathorpe: - Issue set to the milestone: 23
Login to comment on this ticket.