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/api: fallback to context-free definitions fails for cgo targets #54657

Open
mdempsky opened this issue Aug 24, 2022 · 2 comments
Open

cmd/api: fallback to context-free definitions fails for cgo targets #54657

mdempsky opened this issue Aug 24, 2022 · 2 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@mdempsky
Copy link
Member

mdempsky commented Aug 24, 2022

In https://go-review.googlesource.com/c/go/+/421879/13/api/next/46731.txt, we needed to list:

pkg runtime/cgo (darwin-amd64-cgo), type Incomplete struct #46731
pkg runtime/cgo (freebsd-386-cgo), type Incomplete struct #46731
pkg runtime/cgo (freebsd-amd64-cgo), type Incomplete struct #46731
pkg runtime/cgo (freebsd-arm-cgo), type Incomplete struct #46731
pkg runtime/cgo (linux-386-cgo), type Incomplete struct #46731
pkg runtime/cgo (linux-amd64-cgo), type Incomplete struct #46731
pkg runtime/cgo (linux-arm-cgo), type Incomplete struct #46731
pkg runtime/cgo (netbsd-386-cgo), type Incomplete struct #46731
pkg runtime/cgo (netbsd-amd64-cgo), type Incomplete struct #46731
pkg runtime/cgo (netbsd-arm-cgo), type Incomplete struct #46731
pkg runtime/cgo (netbsd-arm64-cgo), type Incomplete struct #46731
pkg runtime/cgo (openbsd-386-cgo), type Incomplete struct #46731
pkg runtime/cgo (openbsd-amd64-cgo), type Incomplete struct #46731
pkg runtime/cgo, type Incomplete struct #46731

in the api/next file. This is because if the file instead contains just the last line, cmd/api complains:

##### API check
Error running API checker: exit status 1
+pkg runtime/cgo (darwin-amd64-cgo), type Incomplete struct
+pkg runtime/cgo (freebsd-386-cgo), type Incomplete struct
+pkg runtime/cgo (freebsd-amd64-cgo), type Incomplete struct
+pkg runtime/cgo (freebsd-arm-cgo), type Incomplete struct
+pkg runtime/cgo (linux-386-cgo), type Incomplete struct
+pkg runtime/cgo (linux-amd64-cgo), type Incomplete struct
+pkg runtime/cgo (linux-arm-cgo), type Incomplete struct
+pkg runtime/cgo (netbsd-386-cgo), type Incomplete struct
+pkg runtime/cgo (netbsd-amd64-cgo), type Incomplete struct
+pkg runtime/cgo (netbsd-arm-cgo), type Incomplete struct
+pkg runtime/cgo (netbsd-arm64-cgo), type Incomplete struct
+pkg runtime/cgo (openbsd-386-cgo), type Incomplete struct
+pkg runtime/cgo (openbsd-amd64-cgo), type Incomplete struct
±pkg runtime/cgo, type Incomplete struct

But shouldn't the goos-goarch-cgo targets fall back to the context-free definition? Why isn't that working here?

@mdempsky mdempsky added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 24, 2022
@mdempsky mdempsky added this to the Backlog milestone Aug 24, 2022
@cuonglm

This comment was marked as resolved.

@mdempsky

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

2 participants