You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main crate rodbus has default features serial and tls.
Workspace projects rodbus-ffi and rodbus-ffi-java have features that just activate the corresponding dependency features, e.g., in rodbus-ffi Cargo.toml:
I cannot for the life of me figure out how to produce metadata that properly excludes the default features. I want to be able to use cargo metadata to produce a custom SBOM under different feature configurations, but I seem to always get all the dependencies even with the --no-default-features flag.
Any tips for debugging this?
The text was updated successfully, but these errors were encountered:
jadamcrain
changed the title
cargo metadata and --no-deafult-features
cargo metadata and --no-default-features
Aug 8, 2022
cargo metadata is currently only capable of resolving a workspace as a whole. That means all workspace members participate in resolving the features. In your workspace, rodbus-bindings enables the default features of rodbus-ffi. Setting default-features=false for that dependency can remove it. rust-lang/cargo#7754 is tracking this limitation.
I have the following workspace:
https://github.com/stepfunc/rodbus
The main crate
rodbus
has default featuresserial
andtls
.Workspace projects
rodbus-ffi
androdbus-ffi-java
have features that just activate the corresponding dependency features, e.g., in rodbus-ffi Cargo.toml:I cannot for the life of me figure out how to produce metadata that properly excludes the default features. I want to be able to use
cargo metadata
to produce a custom SBOM under different feature configurations, but I seem to always get all the dependencies even with the--no-default-features
flag.Any tips for debugging this?
The text was updated successfully, but these errors were encountered: