-
Notifications
You must be signed in to change notification settings - Fork 176
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 policy for ICU4X and Rust version compatibility #3425
Comments
I'm in favor of this, but I would also include the potential for violating MSRN in patch releases when MxSRN is at risk (and upstream isn't willing or capable of doing the necessary mitigation). Basically, I think it should be okay to make The reason is the same reason I've given before: using Rust nightly on a pinned nightly that you are unwilling to update is not very well supported in the ecosystem, and while I understand the use case for doing so, I think in cases of unresolvable conflict of needs we should pick the direction that has friction in the use case where there already is a lot of friction (and is not generally considered good practice). I think this is the only scenario where these four may come in conflict with each other. There is the theoretical scenario where MxSRV and MSRV are in conflict but that seems far more rare since I expect attempts to ask for mitigation paths to be much more consistently successful (and that these cases will be very very rare in the first place). I also want to underscore for others that the MxSRV/MxSRN policies are good guidelines on when we ought to ask the Rust project to set timelines, but they are not beholden to anything we decide here. That said, I think in most cases a smooth migration path is available, and in most cases just going "hey we'd like this to work for a couple more months, can you provide a migration path for that long" ought to suffice. |
I usually see crates guaranteeing 6 months, i.e. 4 releases of MSRV. While all our dependencies are building with 1.61 (which is older) as of today, I don't think that will necessarily stay that way for the whole 1.0 release track. Compiler/language changes seem to make breaking changes on a similar time scale. |
Most crates yes, but larger / more foundational projects less so, because they wish to be used in scenarios where the stable Rust compiler will be rarely upgraded. I think ICU4X can be in that bucket. This is one of the reasons we have very few dependencies overall. |
The latest |
Yeah I am willing to be more lax about this for datagen CLI. |
Per-crate MSRV is a lot more work to enforce, Rust currently doesn't have good tooling for it. |
I think we can for |
This seems very limiting for adopting new language features going forward, which seems bad. As @robertbastian notes, the rest of the Rust ecosystem seems to guarantee less. The cost of providing this guarantee seems unfavorable especially if other crates pretty much ensure that consumers need to update Rust itself on the order of months as opposed to years. Is there a more elaborate rationale for why we should do the work to enable others to stay on older Rust versions than is generally customary in the ecosystem? |
Note that out of all the things talked about here, MSRV is the one that we have generally considered already established. Not necessarily sure if it is actually up for debate here since I believe this was part of our 1.0 guarantee (I could be wrong). I do somewhat agree that this is far stricter than most of the Rust ecosystem. However it is not as strict as quite a few of the foundational Rust crates (e.g. regex and log are 1.60, serde is 1.19, etc). The closer you are to the bottom of a dependency tree, the more likely it is that the crates do this. We lose out on opportunities for use in other crates that care about this without a sufficient MSRV. Part of the thing here is: we are not planning to only be used by the Rust ecosystem. Those who have already bought in to Rust may be very used to this, but for those who haven't, constant toolchain churn can be a major downside. Furthermore, software shipped on distros can have problems with this. Debian stable's rustc is currently 1.63, not far off from where we pin MSRV. Other distros are different. Firefox has managed to depend on beta rustc but AIUI some distros consider that a special case and not everyone has that clout. Finally, since we are conservative about dependencies anyway, I am not overly worried about this, with the exception of datagen. I am fine with us dropping MSRV requirements for datagen and just keeping them for components and capi. Overall maintaining MSRV has not been a major pain in my experience. I have a very different position when it comes to nightly versions, because as I've said elsewhere the Rust project does not particularly cater to people who pin nightlies in an immovable way. We really should not bind ourselves too strongly when it comes to that, and the proposed policy does seem to strike a nice balance between trying to be predictable around nightlies but ultimately being best-effort. |
I assume those crates with older MSRVs do conditional compilation to stay compatible with older compilers, but use new language features when possible. Given that we don't do that, it's unclear to me whether the marginal benefit of supporting old compilers outweighs the cost of not using new language features such as |
Is there any concreteness about who this would be and what the constraints are? There's a lot of space between only supporting the latest Rust release and treating an MSRV change as a semver breaking change for ICU4X (i.e. pinning MSRV for ICU4X 1.x). Notably, https://access.redhat.com/documentation/en-us/red_hat_developer_tools/1 suggests that Red Hat is updating the Rust Toolset for Red Hat Enterprise Linux every 4 Rust releases. If every 4 Rust releases is slow enough for the RHEL audience, how much real need is there for an even slower cadence?
I think it makes sense to take the position that Debian-shipped Taking that position won't prevent Debian-shipped packages from depending on ICU4X: The in-archive copy of ICU4X would be a snapshot from around the same time as the in-archive So I don't think "software shipped on distros" have a problem with a more rolling MSRV in upstream. If Debian x ships ICU4X 1.y as an in-archive package for other in-archive packages to depend on, we shouldn't expect Debian x to shipt ICU4X 1.y+1 anyway. OTOH, taking the position that using Debian-shipped |
@Manishearth - Actual proposal: MSRV: We guarantee 6 months, attempt 9 months, and don't upgrade unless there's a need. If someone wants a feature older than 9 months, they get it; if it's between 6 and 9, they need to make an argument that it has a definite benefit to the project. MxSRV: I think 9 months is reasonable for that. We work with upstream, and we do patch releases. We try to get this handled by Rust upstream as much as possible, and do patch releases if that doesn't work. Ideally push for things to go into an edition, but that's sometimes a harder sell. 9 months is an easier sell for upstream Rust.
Revised proposal for stable compilers: MSRV: guaranteed for 4 releases (N - 4); attempted for 6 releases (N - 6). For example, if today is Rust 1.70, we guarantee that the ICU4X release coming out today works on Rust 1.66, and attempts to work on Rust 1.64. To use a feature between N-4 and N-6, an ICU4X developer needs to make an argument that it has a definite benefit to the project (for example, a client need or a soundness issue). MxSRV: guaranteed for 270 days from the ICU4X installation date. For example, if ICU4X 1.4 is released on 2023-11-30, then we push for stable Rust compilers released on dates up to and including 2024-08-25 to support an ICU4X lockfile produced on 2023-11-29 (installation date that still includes 1.3). Patch release updates may be required but are not preferred. For nightly compilers: Make a best attempt at a support window with no specific guarantees, but an attempt at 3-6 months in the past and the future. LGTM: @Manishearth @hsivonen @robertbastian @skius (@sffc) |
One more note: I'd like it if we can give 1.68.2 special status for the ICU4X 1.x release stream, as that is the last version of stable Rust that can build 1.0 and 1.1. Might be a moot point if we release 2.0 sufficiently early in 2024. |
We've had some past discussions in this area, such as:
The problem I want to talk about today is what we should do with the Rust compiler makes breaking changes. This has now happened to us recently on both the nightly and the stable release channels:
icu_capi_freertos
stopped compiling in Rust nightly this April; see Detect nightly in icu_capi_freertos, bump to 1.2.1 #3394We have a nightly CI now, which is good because it can alert us to upcoming breakages. @Manishearth pointed out that we may be able to work with the Rust team on timelines for rolling out features that would break us.
First, some definitions:
* "Guarantee to work" means that the full ICU4X test suite at the given version should pass without errors on the stated Rust compiler version.
I'd like to see us advocate for the following guarantees:
I want to highlight the following aspects of this policy:
cargo add
on 2023-01-25 are still on ICU4X 1.0. This would imply that we seek out a guarantee where that particular ICU4X version should continue working until 2023-10-25.Discuss with:
Optional:
The text was updated successfully, but these errors were encountered: