tealdeer-rs / tealdeer

A very fast implementation of tldr in Rust.
https://tealdeer-rs.github.io/tealdeer/
Apache License 2.0
4.17k stars 123 forks source link

RFC: Tealdeer MSRV Policy #190

Closed dbrgn closed 3 years ago

dbrgn commented 3 years ago

Right now Tealdeer has a "bump it once we need it" MSRV (Minimal Supported Rust Version) policy. However, the question arose whether this makes sense or not.

As an application (as opposed to a library), there is less of a problem if we always follow stable Rust. The main concern would be distro packaging. If we always jump right on the latest version, we'll make the life harder for packagers.

Right now, according to https://pkgs.org/search/?q=rustc, the following rustc versions are distributed:

I'm not sure how much effort it is for distro packagers to use a newer rustc when building packages. Right now tealdeer is packaged in the following non-rolling-release distros:


I see a few options:

1. Always track current stable

2. Support the lowest version that we can with our current set of dependencies

3. Support "stable + n" versions

For example, if we pick "stable + 4", we'd be able to support building on any system that has a rustc which is not older than half a year. With "stable + 2", we'd be able to support building on any system that has a rustc which is not older than 3 months.

4. Support the version that latest mainstream distros (e.g. Debian, Ubuntu, Red Hat) support


Since tealdeer isn't exactly a critical project, I'd be against 4, unless there are compelling reasons for it.

Always tracking stable (1) is convenient, but usually it's very little effort for the developers to support a few more versions of rustc, and it can avoid a lot of pain for packagers.

Right now we're roughly following 2. I'd tend towards picking 2 or 3 for our future MSRV policy.

What are your thoughts, @niklasmohrin @dmaahs2017?

niklasmohrin commented 3 years ago

Oh, right, I totally forgot about packaging. Woops

I agree with making life easier for packagers, I have to wonder whether having an "hard" msrv really helps.

  1. I would believe that the best experience for the end user is always archived with the latest compiler, because it includes the most recent optimizations
  2. We don't release that often. Packagers don't really need to keep up with us, because with every release of tealdeer, several compiler versions have been released in the mean time and the latest compiler the packager has installed might well be older than say 3 months
  3. updating rustc is easy. If I was to package tealdeer binaries, I would just update to the latest stable and avoid all the trouble

That said, I have never been in the place of a packager and have no idea whether these thoughts line up with reality

I also dont know about any rules that these package bases lay out.

Maybe we could reach out to some of our packagers and get their input to decide what to do

dbrgn commented 3 years ago

Regarding 3, you're often bound to the version offered by the distro packaging toolchain and cannot simply use rustup to install the latest rustc.

I contacted a few of the packagers via e-mail, maybe some of them will leave a comment here 🙂

decathorpe commented 3 years ago

Hi! Speaking for Fedora:

We only have latest stable Rust + Cargo available, usually within days of it being released. So bumping MSRV is not an issue for us. On the other hand, projects sticking with a very old MSRV are sometimes burdensome for us, because that means either keeping additional old versions of libraries around, or patching projects to allow newer versions of dependencies because we don't care about support for old Rust compilers.

dmaahs2017 commented 3 years ago

I don't have much of a preference. I'd say defer to what works best for packagers. But like @niklasmohrin said, we don't release that often so it's unlikely we release right after a new version of rust is released before that version is available for packagers.

Staudey commented 3 years ago

Hi there, and thanks for inviting me to the discussion via email!

For Solus we try to keep up with the latest stable Rust version. If you give us half a month or so after the release of the stable Rust version then we should usually have it available. i.e. we're not as fast as Fedora (see above) due to lacking manpower, but try to keep it reasonably up-to-date. Case in point, right now we're still at version 1.51, but it shouldn't take too long for that to change.

By the way, Solus IS a rolling release distro, contrary to what you wrote above 😉

dbrgn commented 3 years ago

@Staudey thanks for the correction, I wasn't aware that Solus has a rolling release model 🙂

From the feedback so far, I'd suggest the following as MSRV policy:

MSRV policy: When publishing a Tealdeer release, the Rust version required to build it should be stable for at least a month.

But let's wait another day to see if there's more feedback coming in.