You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The recently released version 0.23.18 bumped the MSRV from 1.63 to 1.71 in a patch release. This was done in #2220 with seemingly no strong necessity, IIUC mostly to adopt the let ... else syntax?
We are downstream users of rustls through a variety of intermediate dependencies and do rely on MSRV 1.63 (building on Debian stable). Shipping this MSRV bump hence breaks our builds. While this is a common issue, we're usually 'okay' with doing some pinning to ensure we can maintain the 1.63 MSRV.
However, in this case we really, really don't want to pin rustls back due to security considerations. Given that the bump happened casually on a patch release means that we have no 'stable' channel that we can keep using (i.e., for which security updates would be provided).
As this doesn't only concern one crate/project, but quite a few projects that depend on or try to maintain an MSRV of 1.63, I'd like to ask you to reconsider the MSRV bump, i.e, the changes in #2220.
As we see it, possible solutions could be, for example:
Revert Move MSRV to 1.71 #2220, simply stay on MSRV 1.63, at least until the next Debian stable release ships, or
Intermittently revert Move MSRV to 1.71 #2220, possibly ship it as part of a minor release, and committing to providing backports of security fixes to the 0.23 branch.
Reacted by Matt Corallo, Martin Algesten, Steven Roose, leonardo and Yuki Kishimoto
With ureq (also the new ureq3 which is RC 2), I try to maintain a conservative MSRV. This change forces me to fall in line with 1.71, which is unfortunate since I had hoped to stay on 1.65 for now. I know I'm in a minority that considers MSRV bumps borderline breaking change in semver terms.
For context, I'm fighting an uphill battle. Someone wanted me to ensure ureq 2.x was compatible with 1.63, and I gave up on that one :)
Reacted by Steven Roose, Matt Corallo and Elias Rohrer
re #2208 (comment) (and rustls/rustls-native-certs#152), maybe it's time we just take the leap to 1.64 or 1.65?
The end goal here is to allow this tool to depend on providers in other crates.
The second commit is a straight rename from rustls-bench/src/bench_impl.rs to rustls-bench/src/main.rs but git...
I think we'd still be very safely on the conservative side of the ecosystem
Might even consider going all the way to 1.70
stable Debian (1.63) would be the casualty but with stuff like libc and tokio already going beyond 1.63 I think our current MSRV is starting to become too painful relative to the benefit
are there any widely-adopted rolling msrv schemes? (ie, can we automate this and not think about it any more?)
i know tokio have a policy like that, but don't bump the msrv automatically
I think Renovate can do this
but personally I don't like it
it's always a trade-off and IMO those are best made by people
also don't feel like we've spent a whole lot of time on discussing this over the past... year or so?
we need 1.80+ to delete polyfill.rs, so that is too aggressive.
there's a comment in ech client asking for let..else, which is 1.64+
we can move from some uses of once_cell in 1.70+, but i think we still need to keep the dependency for no-std uses
Re MSRV: I'd like to be able to use security-framework 3.0 in rustls-platform-verifier since that's the only(?) way to get new APIs into the crate. That requires 1.70 though, which is only 1.5 years old.
Its definitely not a must though. I just anticipate needing to add new APIs for an unrelated work project, and keeping the deps in sync would be nice.
This was done in #2220 with seemingly no strong necessity,
The main impetus was generally MSRV increases in our dependencies, meaning we were pinning an increasing number of them (both in this crate, and others in rustls org).
Revert Move MSRV to 1.71 #2220, simply stay on MSRV 1.63, at least until the next Debian stable release ships, or
AIUI Debian "trixie" would become stable sometime mid-2025? That would mean we would effectively have a minus 3-year MSRV policy. ("bookworm" became stable in June 2023, at which point 1.63 was already almost a year old.) That seems pretty exceptional? eg, tokio has a minus 6-month MSRV policy. I accept that tokio has a different posture and position in the ecosystem to rustls.
Intermittently revert Move MSRV to 1.71 #2220, possibly ship it as part of a minor release, and committing to providing backports of security fixes to the 0.23 branch.
I think if we were to adopt a policy of "MSRV changes are breaking changes" (which is AIUI out of line with the rest of the ecosystem) I would want the start of each release line to aggressively take the latest rustc as its MSRV. In other words, 0.23.0 would have a MSRV of something like 1.75 or 1.76.
Reacted by Dirkjan Ochtman, Martin Algesten, dunxen, Paolo Barbolini and Steven Roose
However, in this case we really, really don't want to pin rustls back due to security considerations. Given that the bump happened casually on a patch release means that we have no 'stable' channel that we can keep using (i.e., for which security updates would be provided).
What is stopping you from taking rustup from apt repositories and using it to bring in a newer toolchain for your Rust stuff?
The Debian release cycle is just extremely slow relative to the Rust one. The rustls project has been pretty conservative, and I would argue it still is (1.71 was released in June 2023), but I don't think we can match Debian.
Maybe this is where we talk about commercial extended support?
That seems pretty exceptional? eg, tokio has a minus 6-month MSRV policy. I accept that tokio has a different posture and position in the ecosystem to rustls.
Yeah, I think ureq (and me personally) fall into a category that favors slowly moving software in stark contrast to "trendy stuff" like tokio. It's a difficult position to be in because central crates like the time crate forces the ecosystem to their policy.
What is stopping you from taking rustup from apt repositories and using it to bring in a newer toolchain for your Rust stuff?
That question has been debated elsewhere many times. I think some enterprise and similar simply do not want rustup. Rightly or wrongly it's not a fight I'm interested in taking on, so I've fallen into this mindset of being as conservative with MSRV as I possibly can. It just helps my users.
The MSRV bump was bundled with a security fix in the same patch, which means I can't get any combo of rustls building cleanly without either accepting that my MSRV is going up, or that I can't avoid that RUSTSEC. In practice not one that affects ureq, but CI are CI and scream angrily at me :)
+ cargo deny --all-features --log-level error --target aarch64-apple-darwin check
error[vulnerability]: rustls network-reachable panic in `Acceptor::accept`
┌─ /Users/martin/dev/ureq/Cargo.lock:78:1
│
78 │ rustls 0.23.17 registry+https://github.com/rust-lang/crates.io-index
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ security vulnerability detected
│
├ ID: RUSTSEC-2024-0399
├ Advisory: https://rustsec.org/advisories/RUSTSEC-2024-0399
├ A bug introduced in rustls 0.23.13 leads to a panic if the received
TLS ClientHello is fragmented. Only servers that use
`rustls::server::Acceptor::accept()` are affected.
Servers that use `tokio-rustls`'s `LazyConfigAcceptor` API are affected.
Servers that use `tokio-rustls`'s `TlsAcceptor` API are not affected.
Servers that use `rustls-ffi`'s `rustls_acceptor_accept` API are affected.
├ Announcement: https://github.com/rustls/rustls/issues/2227
├ Solution: Upgrade to >=0.23.18 (try `cargo update -p rustls`)
├ rustls v0.23.17
├── rustls-platform-verifier v0.3.4
│ └── ureq v3.0.0-rc2
└── ureq v3.0.0-rc2 (*)
I am willing to cut a 0.23.19 release, which would be equal to 0.23.18 minus the MSRV changes.
Note well:
This would be a one-off, specifically to give users with low MSRV requirements a version to pin with RUSTSEC-2024-0399 fixed.
0.23.20 and subsequent releases would have a MSRV of 1.71.
This does not start a new release line for security backports: future security releases will be backported only to (at the time of writing) 0.23, 0.22 and 0.21 release lines. Therefore, if you are on 0.23 a MSRV bump would be needed to take any future security fixes.
@algesten@tnull since this is different to what this issue is requesting, I'll give some opportunity to say "no, that is not useful" -- I won't make this release unless it will be of use.
@ctz tbh I bumped my main to 1.17.1, and if the decision is to put 0.23.20 back to 1.71, I might as well keep it.
Ideally I would like to keep 1.65, but that would force me to the 0.22 line (which I suspect comes with another can of worms for my other rustls-deps such as platform-verifier). For ureq users I suspect neither pinning a specific 0.23 version nor going with 0.22 is a great option.
rustls is such a central dep for ureq, so if 1.71 is what you require I can't do much but follow along.
What is stopping you from taking rustup from apt repositories and using it to bring in a newer toolchain for your Rust stuff?
The ability to do cross-language LTO releases, which is pretty important for release binary size in some cases.
eg, tokio has a minus 6-month MSRV policy. I accept that tokio has a different posture and position in the ecosystem to rustls.
tokio has a policy of not breaking MSRV on patch releases, however. I don't really see any issue with relatively aggressive MSRV policies for projects that (have the resources to) release patch updates to previous versions and which maintain MSRV for patch releases.
tokio has a policy of not breaking MSRV on patch releases, however. I don't really see any issue with relatively aggressive MSRV policies for projects that (have the resources to) release patch updates to previous versions and which maintain MSRV for patch releases.
While we haven't released 1.0 (which is maybe a conversation we should have), this is unfortunately not feasible.
This would be a one-off, specifically to give users with low MSRV requirements a version to pin with RUSTSEC-2024-0399 fixed. @algesten@tnull since this is different to what this issue is requesting, I'll give some opportunity to say "no, that is not useful" -- I won't make this release unless it will be of use.
I mean, thank you, but given that it would only fix our builds now it would be of limited usefulness. It will of course stop being useful as soon as the next security issue pops up that would force us to upgrade, which we may not be able to do so easily.
I want to restate that we're 'usually' open to pin back versions etc to accommodate our MSRV requirements. But the combination of how security-criticalrustls is and its MSRV policy puts us in a really tough spot. Essentially, the only option that would be left for us mid-term would be to drop rustls from our dependencies where possible, which will complicate things considerably as we more or less require it in other parts and generally appreciate it's functionalities and performance (i.e., we're generally a happy user, and would really prefer not having to go that way).
Since tokio has been brought up several times to justify a higher MSRV: please note that they really don't easily bump MSRV on patch releases and also offer clearly documented LTS support for past minor versions that will support the 1.63 MSRV until July 2025.
While we haven't released 1.0 (which is maybe a conversation we should have), this is unfortunately not feasible.
Yes, I do understand providing backports can be difficult and would require additional work that you may not want/be able to provide. That is totally fair. On the other side, I have yet to read a convincing argument why rustls really requires the MSRV bump (I don't think let .. else sugar counts? And neither keeping versions of security-framework in-sync with unrelated projects?) and would justify breaking downstream users' builds and considerably increasing the maintenance effort of several projects.
I opened this issue to bring to your attention that there are several projects out there that are in a pretty pickle now. At the end of the though, as @algesten already noted above, we as downstream users have no real choice besides weighing security risk vs. following along with whatever policy rustls decides on.
Since tokio has been brought up several times to justify a higher MSRV: please note that they really don't easily bump MSRV on patch releases and also offer clearly documented LTS support for past minor versions that will support the 1.63 MSRV until July 2025.
FWIW we have 0.22 that has a 1.61 MSRV and will be supported for security updates until December 2025.
In #2243 we are proposing a MSRV policy that guarantees we won't change the MSRV on security maintenance backport branches, or make MSRV changes in patch releases (note those do not exist until we reach 1.0.0).
FWIW we have 0.22 that has a 1.61 MSRV and will be supported for security updates until December 2025.
Ah, very interesting to learn about it. Although, I doubt in this case all intermediate projects that already upgraded to 0.23.x could be convinced to retroactively relax their requirements to 0.22.
In #2243 we are proposing a MSRV policy that guarantees we won't change the MSRV on security maintenance backport branches, or make MSRV changes in patch releases (note those do not exist until we reach 1.0.0).
That is really great news and very much appreciated! Will this also get applied to 0.23.x, i.e., does this mean the bump would be reverted and only re-applied as part of the next minor release 0.24.x?
That is really great news and very much appreciated! Will this also get applied to 0.23.x, i.e., does this mean the bump would be reverted and only re-applied as part of the next minor release 0.24.x?
It will not. As I mentioned, patch releases aren't available to crates which are pre-1.0.0. A semver major number of zero shifts the meaning of the remaining components along: 0.x to 0.y is a major / breaking change, 0.1.x to 0.1.y is a minor / non-breaking change.
@ctz Actually, I would like to pick you up on your offer of releasing one 0.23.19 that fixes the RUSTSEC, but not moves the MSRV.
The reason is that I literally got a new issue asking me to bump rustls: algesten/ureq#892
This is for ureq 2.x, which I am sunsetting. With hindsight, ureq 2.x should have stayed on rustls 0.22, but at the time, I wasn't aware of your commitment to that version. If I downgrade from 0.23 -> 0.22, I'll make a breaking change and (again) violate semver for 2.x (here's the fallout of me going 0.22 -> 0.23).
With ureq 3.x ready for full release any day, I would therefore like to make one final 0.2 release that fixes the RUSTSEC and stays on the old MSRV.
So if it's not too much trouble, yes please, I would very much appreciate a patch version reverting the MSRV before increasing.
It will not. As I mentioned, patch releases aren't available to crates which are pre-1.0.0. A semver major number of zero shifts the meaning of the remaining components along: 0.x to 0.y is a major / breaking change, 0.1.x to 0.1.y is a minor / non-breaking change.
This is really unfortunate. As mentioned over in the MSRV policy PR, not providing a stable MSRV for the newest minor release branch is very confusing and essentially traps users that didn't read the (only soon to be actually documented) fine-print. It surely also can't be the idea that people shouldn't ever run the latest release branch?
You may not consider MSRV changes as breaking w.r.t. rustls, but for your (direct and transitive) user base, they are.
It will not. As I mentioned, patch releases aren't available to crates which are pre-1.0.0. A semver major number of zero shifts the meaning of the remaining components along: 0.x to 0.y is a major / breaking change, 0.1.x to 0.1.y is a minor / non-breaking change.
This is really unfortunate. As mentioned over in the MSRV policy PR, not providing a stable MSRV for the newest minor release branch is very confusing and essentially traps users that didn't read the (only soon to be actually documented) fine-print. It surely also can't be the idea that people shouldn't ever run the latest release branch?
You may not consider MSRV changes as breaking w.r.t. rustls, but for your (direct and transitive) user base, they are.
It is widespread standard practice in the Rust ecosystem (and for good reason) that MSRV bumps are not considered semver-breaking. For the vast majority of users, none of this is an issue because people stick much closer to latest stable -- and Rust itself doesn't even have backport security fixes beyond the latest stable.
It is widespread standard practice in the Rust ecosystem (and for good reason) that MSRV bumps are not considered semver-breaking. For the vast majority of users, none of this is an issue because people stick much closer to latest stable -- and Rust itself doesn't even have backport security fixes beyond the latest stable.
I however assume that you see how the policy of "yes we guarantee an MSRV but not for the current release branch, so it might change at any moment" is kind of misleading as no dependent project actually trying/needing to guarantee an MSRV can actually lean on it? What you're currently saying (and actually, in fact, doing right now) is "this specific version compiles under that version, but we might ship a patch release bundling MSRV bumps with security fixes at any moment".
I also don't buy that this is not an issue "for a vast majority" of users. In fact most projects by now have an MSRV policy (and for good reason), and in my experience an MSRV of 1.63 is the current standard in the ecosystem. For example, just of the top of my head, ureq, reqwest, hyper and many more direct dependents of rustls currently promise an MSRV of 1.63 to their users. That is, until rustls unilaterally starts deciding to bump it transitively for all downstream users, and in this case even without an 'escape path'.
So even apart from the particular case of v1.63, any downstream project can now decide between never running the most-recent rustls releases, or not actually guaranteeing an MSRV to their users. I hope you see why this is unfortunate and an issue that is really not just about rustls?
It is widespread standard practice in the Rust ecosystem (and for good reason) that MSRV bumps are not considered semver-breaking. For the vast majority of users, none of this is an issue because people stick much closer to latest stable -- and Rust itself doesn't even have backport security fixes beyond the latest stable.
I however assume that you see how the policy of "yes we guarantee an MSRV but not for the current release branch, so it might change at any moment" is kind of misleading as no dependent project actually trying/needing to guarantee an MSRV can actually lean on it? What you're currently saying (and actually, in fact, doing right now) is "this specific version compiles under that version, but we might ship a patch release bundling MSRV bumps with security fixes at any moment".
It would be unusual that we ship a security fix and an MSRV bump in the same release, but yes, it can happen. So far we did not write up an MSRV policy and just tried to be conservative about it, now we're slightly less conservative (and writing up to what extent we intend to be conservative in the future).
I also don't buy that this is not an issue "for a vast majority" of users. In fact most projects by now have an MSRV policy, and in my experience an MSRV of 1.63 is the current standard in the ecosystem. For example, just of the top of my head, ureq, reqwest, hyper and many more direct dependents of rustls currently promise an MSRV of 1.63 to their users. That is, until projects unilaterally start deciding to bump it transitively for all downstream users, in this case even without an 'escape path'.
rustls gets 12M downloads per month and so far 6 people showed up in this issue, so yes, I feel comfortable with my "vast majority" statement. Most projects that have an MSRV policy have one that's less conservative than us, not more so. reqwest and hyper are from the same maintainer so I don't think you can count them as independent from each other and note that tokio itself which is actually much more widespread is already on 1.70.
As mentioned previously, happy to discuss commercial support options that have characteristics that better fit your organization's business needs.
In fact most projects by now have an MSRV policy, and in my experience an MSRV of 1.63 is the current standard in the ecosystem.
While I think we both agree on preferring a conservative MSRV, I don't think 1.63 is possible anymore.
The time crate bumped MSRV (in a patch version) making the last possible 1.63 be time = "=0.3.20", however Rust 1.80 made changes that made any time crate pre 0.3.35 impossible to compile (see algesten/ureq#878)
The most conservative MSRV that is realistic right now, I think is 1.67
So far we did not write up an MSRV policy and just tried to be conservative about it, now we're slightly less conservative (and writing up to what extent we intend to be conservative in the future).
Thank you for documenting it.
rustls gets 12M downloads per month and so far 6 people showed up in this issue, so yes, I feel comfortable with my "vast majority" statement. Most projects that have an MSRV policy have one that's less conservative than us, not more so. reqwest and hyper are from the same maintainer so I don't think you can count them as independent from each other and note that tokio itself which is actually much more widespread is already on 1.70.
Heh, come on, comparing downloads and users (i.e., project maintainers) that actually take the time to show up here isn't exactly apples to apples.. Also, tokio's policy has been discussed and clarified above multiple times...
In any case, thank you for taking the time to discuss here (I really mean it!). I'll close this now even though I still no idea how to resolve this on our end, as we in turn also have an MSRV policy that we try to maintain and guarantee to our downstream users.
Activity
algesten commentedon Nov 25, 2024
Reposting here (original comment):
With ureq (also the new ureq3 which is RC 2), I try to maintain a conservative MSRV. This change forces me to fall in line with 1.71, which is unfortunate since I had hoped to stay on 1.65 for now. I know I'm in a minority that considers MSRV bumps borderline breaking change in semver terms.
For context, I'm fighting an uphill battle. Someone wanted me to ensure ureq 2.x was compatible with 1.63, and I gave up on that one :)
djc commentedon Nov 25, 2024
We discussed this in Discord last week:
@djc:
@ctz
@djc
@ctz
@djc
@ctz
@cpu
@ctz
@complexspaces
@cpu
@complexspaces
@cpu
@cpu
ctz commentedon Nov 25, 2024
The main impetus was generally MSRV increases in our dependencies, meaning we were pinning an increasing number of them (both in this crate, and others in rustls org).
AIUI Debian "trixie" would become stable sometime mid-2025? That would mean we would effectively have a minus 3-year MSRV policy. ("bookworm" became stable in June 2023, at which point 1.63 was already almost a year old.) That seems pretty exceptional? eg, tokio has a minus 6-month MSRV policy. I accept that tokio has a different posture and position in the ecosystem to rustls.
I think if we were to adopt a policy of "MSRV changes are breaking changes" (which is AIUI out of line with the rest of the ecosystem) I would want the start of each release line to aggressively take the latest rustc as its MSRV. In other words, 0.23.0 would have a MSRV of something like 1.75 or 1.76.
djc commentedon Nov 25, 2024
What is stopping you from taking rustup from apt repositories and using it to bring in a newer toolchain for your Rust stuff?
The Debian release cycle is just extremely slow relative to the Rust one. The rustls project has been pretty conservative, and I would argue it still is (1.71 was released in June 2023), but I don't think we can match Debian.
Maybe this is where we talk about commercial extended support?
algesten commentedon Nov 25, 2024
Yeah, I think ureq (and me personally) fall into a category that favors slowly moving software in stark contrast to "trendy stuff" like tokio. It's a difficult position to be in because central crates like the time crate forces the ecosystem to their policy.
That question has been debated elsewhere many times. I think some enterprise and similar simply do not want rustup. Rightly or wrongly it's not a fight I'm interested in taking on, so I've fallen into this mindset of being as conservative with MSRV as I possibly can. It just helps my users.
algesten commentedon Nov 25, 2024
Oh. This was the time crate PR I was going to link: time-rs/time#535
algesten commentedon Nov 25, 2024
The MSRV bump was bundled with a security fix in the same patch, which means I can't get any combo of rustls building cleanly without either accepting that my MSRV is going up, or that I can't avoid that RUSTSEC. In practice not one that affects ureq, but CI are CI and scream angrily at me :)
stevenroose commentedon Nov 25, 2024
ctz commentedon Nov 25, 2024
I am willing to cut a 0.23.19 release, which would be equal to 0.23.18 minus the MSRV changes.
Note well:
This would be a one-off, specifically to give users with low MSRV requirements a version to pin with RUSTSEC-2024-0399 fixed.
0.23.20 and subsequent releases would have a MSRV of 1.71.
This does not start a new release line for security backports: future security releases will be backported only to (at the time of writing) 0.23, 0.22 and 0.21 release lines. Therefore, if you are on 0.23 a MSRV bump would be needed to take any future security fixes.
@algesten @tnull since this is different to what this issue is requesting, I'll give some opportunity to say "no, that is not useful" -- I won't make this release unless it will be of use.
algesten commentedon Nov 25, 2024
@ctz tbh I bumped my main to 1.17.1, and if the decision is to put 0.23.20 back to 1.71, I might as well keep it.
Ideally I would like to keep 1.65, but that would force me to the 0.22 line (which I suspect comes with another can of worms for my other rustls-deps such as platform-verifier). For ureq users I suspect neither pinning a specific 0.23 version nor going with 0.22 is a great option.
rustls is such a central dep for ureq, so if 1.71 is what you require I can't do much but follow along.
Thanks for offering though!
TheBlueMatt commentedon Nov 25, 2024
The ability to do cross-language LTO releases, which is pretty important for release binary size in some cases.
tokio has a policy of not breaking MSRV on patch releases, however. I don't really see any issue with relatively aggressive MSRV policies for projects that (have the resources to) release patch updates to previous versions and which maintain MSRV for patch releases.
Merge #157: ci: pin msrv dep version for rustls
djc commentedon Nov 26, 2024
While we haven't released 1.0 (which is maybe a conversation we should have), this is unfortunately not feasible.
tnull commentedon Nov 26, 2024
I mean, thank you, but given that it would only fix our builds now it would be of limited usefulness. It will of course stop being useful as soon as the next security issue pops up that would force us to upgrade, which we may not be able to do so easily.
I want to restate that we're 'usually' open to pin back versions etc to accommodate our MSRV requirements. But the combination of how security-critical
rustlsis and its MSRV policy puts us in a really tough spot. Essentially, the only option that would be left for us mid-term would be to droprustlsfrom our dependencies where possible, which will complicate things considerably as we more or less require it in other parts and generally appreciate it's functionalities and performance (i.e., we're generally a happy user, and would really prefer not having to go that way).Since
tokiohas been brought up several times to justify a higher MSRV: please note that they really don't easily bump MSRV on patch releases and also offer clearly documented LTS support for past minor versions that will support the 1.63 MSRV until July 2025.Yes, I do understand providing backports can be difficult and would require additional work that you may not want/be able to provide. That is totally fair. On the other side, I have yet to read a convincing argument why
rustlsreally requires the MSRV bump (I don't thinklet .. elsesugar counts? And neither keeping versions ofsecurity-frameworkin-sync with unrelated projects?) and would justify breaking downstream users' builds and considerably increasing the maintenance effort of several projects.I opened this issue to bring to your attention that there are several projects out there that are in a pretty pickle now. At the end of the though, as @algesten already noted above, we as downstream users have no real choice besides weighing security risk vs. following along with whatever policy
rustlsdecides on.ctz commentedon Nov 26, 2024
FWIW we have 0.22 that has a 1.61 MSRV and will be supported for security updates until December 2025.
In #2243 we are proposing a MSRV policy that guarantees we won't change the MSRV on security maintenance backport branches, or make MSRV changes in patch releases (note those do not exist until we reach 1.0.0).
tnull commentedon Nov 26, 2024
Ah, very interesting to learn about it. Although, I doubt in this case all intermediate projects that already upgraded to 0.23.x could be convinced to retroactively relax their requirements to 0.22.
That is really great news and very much appreciated! Will this also get applied to 0.23.x, i.e., does this mean the bump would be reverted and only re-applied as part of the next minor release 0.24.x?
ctz commentedon Nov 26, 2024
It will not. As I mentioned, patch releases aren't available to crates which are pre-1.0.0. A semver major number of zero shifts the meaning of the remaining components along: 0.x to 0.y is a major / breaking change, 0.1.x to 0.1.y is a minor / non-breaking change.
algesten commentedon Nov 27, 2024
@ctz Actually, I would like to pick you up on your offer of releasing one 0.23.19 that fixes the RUSTSEC, but not moves the MSRV.
The reason is that I literally got a new issue asking me to bump rustls: algesten/ureq#892
This is for ureq 2.x, which I am sunsetting. With hindsight, ureq 2.x should have stayed on rustls 0.22, but at the time, I wasn't aware of your commitment to that version. If I downgrade from 0.23 -> 0.22, I'll make a breaking change and (again) violate semver for 2.x (here's the fallout of me going 0.22 -> 0.23).
With ureq 3.x ready for full release any day, I would therefore like to make one final 0.2 release that fixes the RUSTSEC and stays on the old MSRV.
So if it's not too much trouble, yes please, I would very much appreciate a patch version reverting the MSRV before increasing.
tnull commentedon Nov 27, 2024
This is really unfortunate. As mentioned over in the MSRV policy PR, not providing a stable MSRV for the newest minor release branch is very confusing and essentially traps users that didn't read the (only soon to be actually documented) fine-print. It surely also can't be the idea that people shouldn't ever run the latest release branch?
You may not consider MSRV changes as breaking w.r.t.
rustls, but for your (direct and transitive) user base, they are.djc commentedon Nov 27, 2024
It is widespread standard practice in the Rust ecosystem (and for good reason) that MSRV bumps are not considered semver-breaking. For the vast majority of users, none of this is an issue because people stick much closer to latest stable -- and Rust itself doesn't even have backport security fixes beyond the latest stable.
tnull commentedon Nov 27, 2024
I however assume that you see how the policy of "yes we guarantee an MSRV but not for the current release branch, so it might change at any moment" is kind of misleading as no dependent project actually trying/needing to guarantee an MSRV can actually lean on it? What you're currently saying (and actually, in fact, doing right now) is "this specific version compiles under that version, but we might ship a patch release bundling MSRV bumps with security fixes at any moment".
I also don't buy that this is not an issue "for a vast majority" of users. In fact most projects by now have an MSRV policy (and for good reason), and in my experience an MSRV of 1.63 is the current standard in the ecosystem. For example, just of the top of my head,
ureq,reqwest,hyperand many more direct dependents ofrustlscurrently promise an MSRV of 1.63 to their users. That is, untilrustlsunilaterally starts deciding to bump it transitively for all downstream users, and in this case even without an 'escape path'.So even apart from the particular case of v1.63, any downstream project can now decide between never running the most-recent
rustlsreleases, or not actually guaranteeing an MSRV to their users. I hope you see why this is unfortunate and an issue that is really not just aboutrustls?djc commentedon Nov 27, 2024
It would be unusual that we ship a security fix and an MSRV bump in the same release, but yes, it can happen. So far we did not write up an MSRV policy and just tried to be conservative about it, now we're slightly less conservative (and writing up to what extent we intend to be conservative in the future).
rustls gets 12M downloads per month and so far 6 people showed up in this issue, so yes, I feel comfortable with my "vast majority" statement. Most projects that have an MSRV policy have one that's less conservative than us, not more so. reqwest and hyper are from the same maintainer so I don't think you can count them as independent from each other and note that tokio itself which is actually much more widespread is already on 1.70.
As mentioned previously, happy to discuss commercial support options that have characteristics that better fit your organization's business needs.
algesten commentedon Nov 27, 2024
While I think we both agree on preferring a conservative MSRV, I don't think 1.63 is possible anymore.
The
timecrate bumped MSRV (in a patch version) making the last possible 1.63 betime = "=0.3.20", however Rust 1.80 made changes that made any time crate pre 0.3.35 impossible to compile (see algesten/ureq#878)The most conservative MSRV that is realistic right now, I think is 1.67
tnull commentedon Nov 27, 2024
Thank you for documenting it.
Heh, come on, comparing downloads and users (i.e., project maintainers) that actually take the time to show up here isn't exactly apples to apples.. Also,
tokio's policy has been discussed and clarified above multiple times...In any case, thank you for taking the time to discuss here (I really mean it!). I'll close this now even though I still no idea how to resolve this on our end, as we in turn also have an MSRV policy that we try to maintain and guarantee to our downstream users.
Revert `rustls` to version 0.23.17
ctz commentedon Nov 27, 2024
https://crates.io/crates/rustls/0.23.19
algesten commentedon Nov 27, 2024
Thank you very much!
Merge bitcoindevkit/rust-electrum-client#157: ci: pin msrv dep versio…