Closed lemmih closed 1 year ago
Before this PR, the no_sdk
feature was independent from the dependencies and compiling without default features would fail:
$ cargo build --no-default-features
Compiling frc42_hasher v1.5.0 (/home/lemmih/coding/filecoin/frc42_dispatch/hasher)
error[E0432]: unresolved import `fvm_sdk`
--> frc42_dispatch/hasher/src/hash.rs:2:5
|
2 | use fvm_sdk::crypto;
| ^^^^^^^ use of undeclared crate or module `fvm_sdk`
For more information about this error, try `rustc --explain E0432`.
error: could not compile `frc42_hasher` due to previous error
With this PR, all feature combinations work as intended. Compiling without default features disables the SDK code, and compiling with default features (or explicitly enabling use_sdk
) will pull in the right dependencies.
Compile features work better when they are additive.