statrs-dev / statrs

Statistical computation library for Rust
https://docs.rs/statrs/latest/statrs/
MIT License
582 stars 83 forks source link

Support MSRV concept #242

Closed YeungOnion closed 3 weeks ago

YeungOnion commented 3 months ago

We tried this out for the #235, but ran into some trouble when dev-dependencies were not able to satisfy the version that the lib can. Since it's not tested while on crates.io, perhaps this is a non-issue, but it does mean that the CI will fail because of dependencies that we currently use for benchmarking. It would be nice to ensure that the tests will run on our MSRV. Any other input welcome here regarding what one would expect of the MSRV information and what might be unexpected or where you would expect to look for information if something isn't going your way when using this dependency.

FreezyLemon commented 1 month ago

Is there a target for the level of backwards compatibility? The concept of a MSRV has been discussed before, but the actual minimum version that should be supported has not been, I don't think.

I'll give you some examples to illustrate what I mean (these are "targets" I've seen in other projects before):

I should add that there does not have to be a formal MSRV policy, a lot of projects just provide backwards compatibility on a best-effort basis.

All of these have pros and cons. I personally would tend towards not going too far with backwards compatibility as it causes a significant maintenance burden the further you go (and not being able to use new language features is no fun).

YeungOnion commented 1 month ago

At the moment, I'm leaning toward the least stringent which is the last option,

Don't target anything, just use MSRV to inform users what is supported, change MSRV whenever needed or wanted

On the basis that there's not a large usage volume of this crate, and I think knowing more about the breadth of use for this library would be helpful.

FreezyLemon commented 1 month ago

I honestly agree, it's the simplest option and unless there's an explicit request for more backwards compatibility, it probably doesn't make sense to overthink it.

YeungOnion commented 1 month ago

Yeah, seems like a good approach for now. Glad for your putting a light on it so it's intentional.