rust-signals icon indicating copy to clipboard operation
rust-signals copied to clipboard

Change serde to be optional again

Open Pauan opened this issue 5 years ago • 4 comments

Pauan avatar Jan 13 '20 23:01 Pauan

I think this issue can be closed

mpfaff avatar Aug 07 '22 20:08 mpfaff

serde hasn't been made optional, because that's a breaking change.

Pauan avatar Aug 07 '22 20:08 Pauan

The Cargo.toml appears to say otherwise. Is disabling the serde feature by default the breaking change?

mpfaff avatar Aug 07 '22 20:08 mpfaff

Yes, default features are always applied, so they're effectively required.

Even if you try to use default-features = false, it doesn't really work. In order for default-features = false to work, every dependency has to use it. If even one dependency doesn't use it, then it won't work.

For example, dominator has a dependency on futures-signals. If you use dominator and futures-signals, then even if you use default-features = false, it won't work, because dominator isn't using default-features = false.

This means that default-features = false is pretty much always useless and does nothing. So in practice default features are always mandatory.

Pauan avatar Aug 07 '22 22:08 Pauan