-
Notifications
You must be signed in to change notification settings - Fork 24
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
Should minrust
be optional?
#20
Comments
Yes, I think it's reasonable to make it possible to set Alternatively we could go a step further and have |
I'm unsure if we know enough to know how universal a specific lib/bin recommendation is
|
Yeah, those are both good points. Let's gently ping @BurntSushi and see if we can get some first-hand answers ^_^ For your last point, I'm inclined to say that we should aim for long-term best practices. If you're in the rapid prototyping stage, CI is probably a lower concern for you, and you'd be more okay with it breaking. |
While it's on my nice-to-have list, I haven't actually moved anything to Azure yet, so I don't think I understand the operational implications of the With that said, every Rust project I work on (whether libraries or binaries) has a pinned Rust version. Generally, my belief is that if one is going to increase the MSRV, then it should be done explicitly. A pinned Rust version in the CI helps with that. For binaries, I usually keep the pinned version up to date with the latest stable release. In particular, I like to make sure that patch releases for a binary compile on the same version of the compiler as the previous minor version release. I wouldn't want someone's Rust compiler version preventing them from updating to a patch release of my software. For libraries, I tend to be conservative in rough proportion with how widely used the library is. Personally, it would be great if most/all libraries documented a MSRV. A minimal way of doing that is to put a pinned Rust version in the CI configuration. If one doesn't do that and one cares about MSRV, then it becomes a research task to figure it out. This helps other library/binary maintainers that depend on your library. For binaries, I generally don't care what someone's MSRV policy is because I always keep my Rust installation updated. |
Basically, we are offering a toolbox of templates that people can piece together as well as a one-stop template that provides a "good enough" pipeline. As part of this, we accept a MSRV parameter ( I stopped using MSRV for my bin's because of (1) I didn't see enough value and wanted to reduce my CI time and (2) I've been running into a lot of issues verifying MSRV. Would love any input you have over on #22 for how we can make it more usable for people. |
@BurntSushi when you say that every project you work on has a pinned Rust version, do you mean a MSRV, or do you mean that your CI is tied to a particular Rust version? Does that mean that you do manual work on every new Rust stable release? Do you run CI against beta? |
I mean MSRV.
No, definitely not. For libraries, the MSRV doesn't change frequently. For binaries, the MSRV only changes when I do a minor or major version release. Otherwise, the MSRV remains the same.
Ah yeah, I run CI against a pinned version of Rust in addition to stable, beta and nightly.
Yeah I think that's reasonable/fine. It's libraries that I'm more concerned about. |
Thanks, that's helpful! @epage I think what we'll want to do is encourage library authors to keep a MSRV (if we can push the ecosystem that way, that'd be awesome), but allow authors to opt out of it with something like |
So just to be clear, one thing I say here is that even if a library doesn't want to maintain an official MSRV policy, it is still very useful to document a pinned version of Rust in the CI configuration, which is informative to others. Also, it should go without saying that I am not the only perspective here. There are definitely some folks that think any kind of MSRV is harmful to the ecosystem since it holds it back. And there are others that just think it's too much maintenance burden to bother with. And there are still others that think bumping the MSRV requires a semver incompatible version bump. All of these perspectives are valid of course, but it's just good to be aware of them if you're consciously trying to push folks in a particular direction. |
This reminds me: I thought MSRV came up at some point in thinking Linux distributions would need it but I thought I saw a post from you saying something like it turned out they didn't need it after all. Is that memory accurate? |
Yes! I got lots of replies from distro packagers here: BurntSushi/ripgrep#1019 |
This also moves the MSRV check out into its own stage since it's not _really_ part of the test stage. Note that this change still leaves the default minimum Rust version as 1.32.0. Fixes #20.
minrust
is good for libraries where the dependent's rust version is less in your control. For binaries, the rust version is more in your control. Cuttingminrust
on these projects can save hassle (I've been finding its pretty brittle to verify it) and save time (both faster turnaround on PRs and keeping free CI usage to a minimum).The main case I can think of for a
minrust
for binaries is if packagers need it but I thought I've seen comments that this isn't as big of a concern.The text was updated successfully, but these errors were encountered: