Skip to content
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

cmd/cgo: fails to generate certain types with Go 1.14 [1.14 backport] #37622

Closed
gopherbot opened this issue Mar 3, 2020 · 4 comments
Closed
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link

@tklauser requested issue #37621 to be considered for backport to the next 1.14 minor release.

@gopherbot please consider this for backport to 1.14, it's a regression.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Mar 3, 2020
@gopherbot gopherbot added this to the Go1.14.1 milestone Mar 3, 2020
@cagedmantis cagedmantis modified the milestones: Go1.14.1, Go1.14.2 Mar 19, 2020
@gopherbot
Copy link
Author

Change https://golang.org/cl/226341 mentions this issue: cmd/cgo, misc/cgo: only cache anonymous struct typedefs with parent name

@gopherbot
Copy link
Author

Change https://golang.org/cl/226497 mentions this issue: [release-branch.go1.14] cmd/cgo, misc/cgo: only cache anonymous struct typedefs with parent name

@ianlancetaylor
Copy link
Contributor

Approved because it is a regression, and it breaks generating the x/sys/unix files using Go 1.14.

@ianlancetaylor ianlancetaylor added CherryPickApproved Used during the release process for point releases and removed CherryPickCandidate Used during the release process for point releases labels Mar 30, 2020
gopherbot pushed a commit that referenced this issue Mar 30, 2020
…t typedefs with parent name

CL 181857 broke the translation of certain C types using cmd/cgo -godefs
because it stores each typedef, array and qualified type with their
parent type name in the translation cache.

Fix this by only considering the parent type for typedefs of anonymous
structs which is the only case where types might become ambiguous.

Fixes #37622

Change-Id: I301a749ec89585789cb0d213593bb8b7341beb88
Reviewed-on: https://go-review.googlesource.com/c/go/+/226341
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit a265c2c)
Reviewed-on: https://go-review.googlesource.com/c/go/+/226497
@gopherbot
Copy link
Author

Closed by merging cdd55a3 to release-branch.go1.14.

@golang golang locked and limited conversation to collaborators Mar 30, 2021
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
Projects
None yet
Development

No branches or pull requests

3 participants