You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ go mod init example.com
$ go get github.com/looker-open-source/sdk-codegen/go/sdk/v4
go: downloading gopkg.in/ini.v1 v1.61.0
# github.com/looker-open-source/sdk-codegen/go/sdk/v4
/home/mdempsky/go/pkg/mod/github.com/looker-open-source/sdk-codegen/go@v0.0.1/sdk/v4/methods.go:6729:5: internal compiler error: width not calculated: interface {}
Found with internal Google testing. Haven't attempted to minimize yet. If any contributors want to take a look and find a minimal reproducer of this build failure, that would be great. (Post a comment that you're looking into it to minimize redundant work.)
Edit: Note: This only reproduces if cmd/compile's -p flag is used. go build always sets this, but it needs to be set manually when using go tool compile. Any value seems fine; e.g., -p p reproduces the issue.
package v4
var sink interface{}
//go:noinline
func Do(result, body interface{}) {
sink = &result
}
func DataAction(result DataActionResponse, body DataActionRequest) {
Do(&result, body)
}
type DataActionRequest struct {
Action *interface{}
}
type DataActionResponse struct {
ValidationErrors *ValidationError
}
type ValidationError struct {
}
The issue here is that irgen is failing to CheckSize some of the types it returns. I think the fix is some (most?) of the typ1 calls in noder/types.go need to be changed to typ, but I don't understand the invariants that are expected to be adhered to in the presence of stenciling.
At tip:
Found with internal Google testing. Haven't attempted to minimize yet. If any contributors want to take a look and find a minimal reproducer of this build failure, that would be great. (Post a comment that you're looking into it to minimize redundant work.)
/cc @cuonglm @danscales
The text was updated successfully, but these errors were encountered: