-
Notifications
You must be signed in to change notification settings - Fork 13.3k
u16 format precision change, breach of the Rust stability guarantee #140250
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
Comments
You can nominate this for library team (re-)discussion. |
Also FYI @m-ou-se |
Nominated this for @rust-lang/libs-api |
My (probably slightly biased) analysis: Of those five cases listed above, three are only example strings in unit tests. In Cases where this only broke an example string in a unit test:
Other cases:
All the broken tests had subtly non-portable code: on a 16-bit platform, the widths would be silently truncated resulting in wrong outputs and failed tests. The breaking change is fixing that bug, by only guaranteeing 16 bits which we know exists on all targets. This all seems well within the range of acceptable to me. Especially because we changed a potential silent subtle bug (even if only on small platforms) to a clear error. |
We discussed this in today's @rust-lang/libs-api meeting. We agreed with @m-ou-se's report on the issue, namely that all the affected crates were fine with this change. Based on this, we're planning to continue with this change. |
Hi. I have been following #136932, where
format!
is changed to panic on widths and precisions of more than 16 bits. (This is for performance reasons, as it makesFormattingOptions
much smaller.)When this was originally proposed, a crater run was performed. This showed two regressions:
Since then, we have also had more regressions reported:
This seems to show that this change is not merely a theoretical problem, but causes real regressions. The statement that it "affects almost no existing code" turns out to have been overly optimistic.
I appreciate the efforts to improve things, but it seems to me that this change:
I think the decison to merge #136932 should be reconsidered in the light of this new information.
What is the process for that?
The text was updated successfully, but these errors were encountered: