-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
fmt: map printing sort does not deterministically sort differing types [1.12 backport] #30484
Comments
Change https://golang.org/cl/164617 mentions this issue: |
@randall77 - there isn't a reason provided in the gopherbot message. Would you mind providing one for this backport? |
There was a bug in the map printing code introduced in 1.12 where in certain instances the map did not print deterministically. |
Closed by merging 7294ede to release-branch.go1.12. |
Previously, the result of sorting a map[interface{}] containing multiple concrete types was non-deterministic. To ensure consistent results, sort first by type name, then by concrete value. Fixes #30484 Change-Id: I10fd4b6a74eefbc87136853af6b2e689bc76ae9d GitHub-Last-Rev: 1b07f0c GitHub-Pull-Request: #30406 Reviewed-on: https://go-review.googlesource.com/c/163745 Reviewed-by: Rob Pike <[email protected]> Reviewed-by: Keith Randall <[email protected]> Run-TryBot: Keith Randall <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> (cherry picked from commit 9d40fad) Reviewed-on: https://go-review.googlesource.com/c/go/+/164617 Run-TryBot: Brad Fitzpatrick <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
@randall77 requested issue #30398 to be considered for backport to the next 1.12 minor release.
The text was updated successfully, but these errors were encountered: