Skip to content

spec, go/types, types2: restore Go 1.20 unification when compiling for Go 1.20 [1.21 backport] #61930

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

Closed
gopherbot opened this issue Aug 10, 2023 · 3 comments
Assignees
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge release-blocker
Milestone

Comments

@gopherbot
Copy link
Contributor

@dmitshur requested issue #61903 to be considered for backport to the next 1.21 minor release.

The fix needs to land on the main branch first (i.e., where Go 1.2​2 development happens), and then it can be backported to release-branch.go1.21. I'll move this to Go1.2​2 milestone and create a backport issue to track the fix for Go 1.21.1.

@gopherbot Please backport to Go 1.21 with the rationale @rsc provided:

[...] we should at least restore the old behavior when go.mod says "go 1.2​0".
Let's try to do that in the next point release.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Aug 10, 2023
@gopherbot gopherbot added this to the Go1.21.1 milestone Aug 10, 2023
@findleyr findleyr changed the title spec: restore Go 1.20 unification when compiling for Go 1.20 [1.21 backport] spec, go/types, types2: restore Go 1.20 unification when compiling for Go 1.20 [1.21 backport] Aug 15, 2023
@griesemer griesemer self-assigned this Aug 18, 2023
@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/520601 mentions this issue: [release-branch.go1.21] go/types, types2: disable interface inference for versions before Go 1.21

@cagedmantis cagedmantis added the CherryPickApproved Used during the release process for point releases label Aug 23, 2023
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Aug 23, 2023
@cagedmantis
Copy link
Contributor

Approved as we aim to restore the old behavior.

@gopherbot
Copy link
Contributor Author

Closed by merging 2d4746f to release-branch.go1.21.

gopherbot pushed a commit that referenced this issue Aug 24, 2023
… for versions before Go 1.21

Change the internal constant enableInterfaceInference to a unifier
field that can be controlled dynamically and set it for Go 1.21
or later.

This restores Go 1.20 unification behavior for interfaces.

Fixes #61930.

Change-Id: Iefd6c0899811f8208a8be9cef2650a07787ae177
Reviewed-on: https://go-review.googlesource.com/c/go/+/519855
Reviewed-by: Robert Findley <[email protected]>
Auto-Submit: Robert Griesemer <[email protected]>
Reviewed-by: Robert Griesemer <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Run-TryBot: Robert Griesemer <[email protected]>
Reviewed-on: https://go-review.googlesource.com/c/go/+/520601
@golang golang locked and limited conversation to collaborators Aug 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge release-blocker
Projects
None yet
Development

No branches or pull requests

4 participants