num-complex icon indicating copy to clipboard operation
num-complex copied to clipboard

Rust version compatibility of features

Open vks opened this issue 6 years ago • 2 comments

The README specifies that Rust 1.15 is supported. However, Rand 0.5 requires at least 1.22, so at least the rand features does break the promise from the README. Are non-default features exempt from the Rust version requirements? Does that mean I could submit a pull request for upgrading to Rand 0.7, requiring Rust 1.32?

vks avatar Aug 02 '19 15:08 vks

Yeah, it's a pragmatic decision -- we can't force the choice of minimum Rust on other crates. So features that exist for interoperability with other crates, like rand and serde, are necessarily bound to their requirements. (Although serde is very conservative too, so 1.15 is fine there.)

But because it's a public dependency, it's still a breaking change to move to a new rand semver, regardless of compiler requirements. I think we probably should do this in the near future though.

cuviper avatar Aug 02 '19 16:08 cuviper

serde says it supports 1.13+, but "derive" feature requires serde-derive which requires 1.31. IMO, we should allow multiple MSRV corresponding to each features, and following requirement is reasonable:

  • num-complex 0.2 requires Rust 1.15+, but "rand" feature (with rand 0.5) requires Rust 1.22+
  • num-complex 0.3 (?) requires Rust 1.15+, but "rand" feature (with rand 0.7) requires Rust 1.32+

I guess this will be compatible with https://github.com/rust-lang/rfcs/pull/2495. num-complex/Cargo.toml says rust >= 1.15, and rand/Cargo.toml says rust >= 1.32.

BTW, Rust 1.25 or older has security advisory. Should we bump up MSRV at least 1.26? https://blog.rust-lang.org/2019/09/30/Security-advisory-for-cargo.html

termoshtt avatar Oct 12 '19 08:10 termoshtt