-
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
net/netip: undocumented breaking change in reflect.DeepEquals #68113
Comments
CC @mknyszek This was changed in https://go.dev/cl/577035. This is the first report we've seen so I don't think we need to roll back, but this does need a release note. Looking at the CL, it's not clear to me why the fields of |
I don't mind sending a release note patch, but in the context of the issue title, would this be considered a breaking change? Furthermore, the fact that we get a
The reason is testing. To construct an Alternatively we can have a constructor function that we export instead, like we do for |
Change https://go.dev/cl/594295 mentions this issue: |
Thanks. I agree that this is not a breaking change but it is a change. We should document changes that can affect people's code, even if that code is relying on undocumented properties. Sent CL 594295. |
I do think the code will be clearer if we don't export the fields of |
Change https://go.dev/cl/593737 mentions this issue: |
I'd actually argue that the 1.22 behavior was incorrect. I didn't consider reflect.DeepEqual behavior at the time. Previously We should probably even lock in this new behavior with tests and document this change as a bug fix. |
Change https://go.dev/cl/594375 mentions this issue: |
👍 from me, I was pretty surprised by the old behavior once I found this. This was even more surprising when combined with #35727, which was the full flow we were triggering in our tests |
For #68113 Change-Id: I19c7d8eff8e3a7a1b6c8e28cb867edeca6be237d Reviewed-on: https://go-review.googlesource.com/c/go/+/593737 Auto-Submit: Ian Lance Taylor <iant@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com> Commit-Queue: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Updates #68113 Change-Id: I1107686ef364f77f48f55534ea8ec68d1785e1e6 Reviewed-on: https://go-review.googlesource.com/c/go/+/594375 Auto-Submit: Brad Fitzpatrick <bradfitz@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
For golang#68113 Change-Id: I19c7d8eff8e3a7a1b6c8e28cb867edeca6be237d Reviewed-on: https://go-review.googlesource.com/c/go/+/593737 Auto-Submit: Ian Lance Taylor <iant@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com> Commit-Queue: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Updates golang#68113 Change-Id: I1107686ef364f77f48f55534ea8ec68d1785e1e6 Reviewed-on: https://go-review.googlesource.com/c/go/+/594375 Auto-Submit: Brad Fitzpatrick <bradfitz@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
Go version
go1.23rc1
Output of
go env
in your module/workspace:Reproduces in Go playground
What did you do?
https://go.dev/play/p/QpsXKVBXX0_M?v=gotip
What did you see happen?
Go 1.22:
::ffff:11.1.1.12 11.1.1.12 false true
Go 1.23:
::ffff:11.1.1.12 11.1.1.12 false false
What did you expect to see?
Either a release note around behavioral change to netip behavior, or consistent behavior between releases.
TBH I am not really sure if the 1.22 behavior was correct, so not necessarily against the change. We detected this in unit tests only.
The text was updated successfully, but these errors were encountered: