-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decide on schedule for bumping minimum supported Rust version #709
Comments
According to this Repology page, most distributions ship one of the three latest Rust releases. This old-ish Mozilla page says that Firefox requires stable Rust 2 weeks after it"s been released—but since Firefox uses a train release model, it means that by the time a release is promoted to "stable", its associated Rust version is already 2+6+6=14 weeks, or 3 months old (one train track takes 6 weeks for Firefox). Extra data points:
With all of that said, I"m proposing what I outlined in #576 (comment):
Perhaps a table would explain it better (dates and versions are approximate—I won"t commit for Newsboat, and I obviously can"t commit for Rust):
Does this seem reasonable? Would that schedule create any problems for your workflow? Let"s decide this by 1 March 2020. Notification cannon for all the people who contributed in the last 6 months: @RomeuG @SeanBE @der-lyse @mjsir911 @rnestler @tsipinakis @t6 @khardix @noctux @juhopp @LucasParsy @kmws (if you ever run |
From the developer perspective, this seems fine to me, I can use However, from the package maintainer (Fedora) perspective, this can get more complicated, and largely depends on which rust version is shipped in which Fedora release; they are unlikely to be version-bumped once released. On the other hand, supporting current stable-2 should be fine. |
On the Debian side this seems a bit too restrictive, Which has the following implications:
I fit into the first point mentioned so with that restriction I"ll either have to look into backporting rust or switch to using an unstable chroot for newsboat development. |
I have always compiled and installed Newsb{euter,oat} myself and never used a version from the Debian packages (cannot remember why, maybe because there weren"t any at the time, not sure). So I reckon the proposed roadmap should be alright with me. Obviously, it would be nice if I could use the default Debian-shipped tools to build Newsboat, but getting the required Rust release manually is not the end of the world to me. |
As (currently) an archlinux user, I"m slightly biased towards "should be buildable with latest rust" because this is what my distribution offers, but this does not necessarily have a say concerning the "least supported" version (which hopefully the CI will check for the folks running more recent rustc versions). As development mostly concerns current git and after forking you made a point of frequent releases (and thus we are at current_stable-2 most of the time) this sounds fine to me :) Two things that crossed my mind though (I do not know enough about rust to really answer them though):
Merry christmas, |
It should be fine for FreeBSD since we currently do a good job of updating our Rust package every 6 weeks on release day or close to it. And stable-2 or stable-4 should give enough slack if something goes wrong with that. |
I use Arch on my private laptop and latest Ubuntu LTS at work, but I compile newsboat myself anyways 🙂 So I"m fine with the stable - 2 minimum required Rust version. |
Thank you all for your responses! \o/ To sum up, the vast majority is fine with the proposed changes, but there are some concerns: @khardix and @tsipinakis (paraphrased by me)
I think the only way to really resolve this is to pin our schedule to those distributions, not to time. For example, we could support the last stable release of every major distro according to DistroWatch. Repology doesn"t have info on all of them, though:
Among the remaining ones, the lowest version is 1.31 (in CentOS 8). That"s a pretty reasonable policy, but I wonder if we won"t be doing our users a dis-service by adopting it. Newsboat directly depends on 19 crates. I took a look at their policies regarding minimum supported versions:
section_testing is not maintained, doesn"t specify anything, and doesn"t even test anything. Yeah, that"s the crate we write all our tests with. Yeah. With all transitive dependencies, Newsboat depends on 102 crates. Two questions arise:
The list of dependencies will only grow: we"ll need some creates to handle JSON and XML, and eventually HTTP and UI as well. Seems like Rust ecosystem is not ready (doesn"t want to be ready?) to provide long-term support that we"ll need for "distro-based" policy. Apropos to this: some users might use our Snap instead. Developers might use Docker containers that we prepare for CI. I understand both of these have drawbacks of their own, but at least that gives people some options to choose from.
I think this is the same problem as with stable distro releases, just on a smaller scale: weeks or months instead of years. I guess it will be resolved, one way or another, when we tackle the bigger problem.
Definitely. It will be checked just like we"re checking for 1.26 today.
It shouldn"t be relevant: with Rust 1.0 release, Rust team made a promise not to change stabilized APIs in a backward-incompatible ways, except to fix bugs. Over the last five years, the only such change that I can remember is a new borrow checker that rejects some programs that were accepted by previous compilers. But, to my knowledge, the code can be written in a way that is accepted by both versions, so it"s not exactly the kind of problem that you mention. But if some Rust release X.Y does break backwards compatibility, and we can"t get around it with conditional compilation or any other trick, I think I would:
I"m not sure what your other point was about. Newsboat will always be compilable with latest Rust version, so you shouldn"t need a container/VM as long as you"re on Arch or have rustup. The lowest version will always be checked by CI, and our experience with 1.26 shows that the problems are infrequent—you can avoid installing 1.26 locally most of the time. You might need that in case of some tricky bugs, but the same is already true for C++ compilers we test on CI—e.g. you might need Clang 5 even though your distro is already on Clang 8 or something. |
@Minoru To be completely honest, the Rust situation on Fedora is currently very broken (at least from what I can tell), so I"m currently not able to update newsboat on any stable Fedoras (sigh). So feel free to ignore Fedora for now 😞 |
Hey, thanks for the response :)
Yeah, that resolves the second point, thanks. |
@Minoru Regarding supporting the Rust version of stable releases of Distros: In my opinion this is not worth the trouble, since packages of the stable releases won"t get updated anyway except for security bugs, so there is no point in keeping support for them in newer versions. Users of these stable distros which build newsboat themselves may as well use rustup. |
@khardix, okay! Though at this point, I view Fedora and Debian more as examples of "point release" approach (in contrast to "rolling release" approach) and the challenges it creates. It"s fine if any of those distros have some problems that aren"t related to the release model itself. @rnestler, my understanding is that not all people like Rustup. I"m aware of only two arguments against it: 1) installation via infamous |
I"m one of the debian rust maintainers and we encourage people to use rustup instead. The compiler in debian stable is mostly to build the rust software shipped in debian itself. Ironically, tracking outdated libraries make it even harder for us to upload it to debian unstable since we would need to port it to recent dependencies downstream. 😿 |
This issue has been pinned for two weeks now, and it"s been a week since I asked for more input over on the mailing list and on Mastodon. This only yielded a single response, with a suggestion for the Ubuntu .deb to install our Snap. I guess it"s time to make a decision, then. My original motivation for this was to avoid stagnation, but after looking at our dependencies in #709 (comment), the overriding concern became to avoid depending on unmaintained, possibly vulnerable versions of crates. BTW, this really made me understand why some people still consider Rust an immature language; with just a few months of support, it kinda is. I still believe that Rust"s safety guarantees outweigh this, and the situation is bound to improve as libraries mature; so I don"t plan to switch away from Rust anytime soon. Anyway. I"m going through with my original proposal from #709 (comment). This means I don"t really resolve problems with point-release distros (outlined in #709 (comment)), but I plan to allay them for users through better documentation: our README will explain how to:
This still leaves the possibility of delays in Debian testing (our newest release might be stuck in queue waiting for new enough Rust to appear in testing), but that"s a risk we"ll have to take. I"m pretty sure that this will become less and less likely as Debian polishes its processes. I"ll make a PR with these changes. If you have anything to add/tweak, or just general thoughts, please share here. And thanks once again for all the responses! It"d be hard to think this through without your perspectives. |
Regarding that, I think having |
@pickfire Thanks for that, but I noted explicitly that I"m talking of a case when conditional compilation can"t help us. |
This fulfills the promise I made in #709 (comment).
I submitted #788 that adds all the docs I promised. Please take a look if you"re interested. |
When I wrote our first Rust code, I used the earliest Rust version I could—it was 1.24. Later on, some important crate updates made me bump that to 1.26. We"re still using that version today.
This situation is great for our users, because it increases the chance that Newsboat can be built with whatever the user has in their distro.
At the same time, this situation is less great for the developers:
ref
in pattern matching arms) and doesn"t have some potentially useful things (I expectasync
/.await
to be a great boon for ourReloader
class).Warnings can be suppressed, and lack of features can be tolerated to a point, but we can"t be stuck with 1.26 forever. We need a schedule by which we will bump this minimum supported version.
My next comment will outline my proposed solution.
The text was updated successfully, but these errors were encountered: