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

x/exp/cmd/gorelease: panics with generic code #52486

Closed
vearutop opened this issue Apr 22, 2022 · 5 comments
Closed

x/exp/cmd/gorelease: panics with generic code #52486

vearutop opened this issue Apr 22, 2022 · 5 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@vearutop
Copy link
Contributor

What version of Go are you using (go version)?

$ go version
go version go1.18.1 darwin/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/vearutop/Library/Caches/go-build"
GOENV="/Users/vearutop/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/vearutop/go/pkg/mod"
GONOPROXY="github.com/adjust,github.com/vearutop,github.com/Unbotify"
GONOSUMDB="github.com/adjust,github.com/vearutop,github.com/Unbotify"
GOOS="darwin"
GOPATH="/Users/vearutop/go"
GOPRIVATE="github.com/adjust,github.com/vearutop,github.com/Unbotify"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.18.1/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.18.1/libexec/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.18.1"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/vearutop/dev/cache/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/n7/jv2b0zv57jzc8y6zhmfzbn7c0000gn/T/go-build2234812828=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

Ran go run golang.org/x/exp/cmd/gorelease@latest in the module containing generic code.

go: downloading golang.org/x/exp v0.0.0-20220414153411-bcd21879b8fd

What did you expect to see?

Successful report with API changes.

What did you see instead?

Panic message.
panic: unknown type kind

goroutine 1 [running]:
golang.org/x/exp/apidiff.(*differ).corr(0x4?, {0x12fb3c0?, 0xc012bcfb90?}, {0x12fb3c0?, 0xc00caabfb0?}, 0x0?)
	/Users/vearutop/go/pkg/mod/golang.org/x/exp@v0.0.0-20220414153411-bcd21879b8fd/apidiff/correspondence.go:129 +0x565
golang.org/x/exp/apidiff.(*differ).corr(0x203003?, {0x12fb398?, 0xc00bd63f08?}, {0x12fb398?, 0xc00c9b6d98?}, 0x0)
	/Users/vearutop/go/pkg/mod/golang.org/x/exp@v0.0.0-20220414153411-bcd21879b8fd/apidiff/correspondence.go:69 +0x5fe
golang.org/x/exp/apidiff.(*differ).corr(0x11d2c2d?, {0x12fb320?, 0xc00a869900?}, {0x12fb320?, 0xc00ca16d00?}, 0x0)
	/Users/vearutop/go/pkg/mod/golang.org/x/exp@v0.0.0-20220414153411-bcd21879b8fd/apidiff/correspondence.go:62 +0x190
golang.org/x/exp/apidiff.(*differ).correspond(...)
	/Users/vearutop/go/pkg/mod/golang.org/x/exp@v0.0.0-20220414153411-bcd21879b8fd/apidiff/correspondence.go:17
golang.org/x/exp/apidiff.(*differ).checkCorrespondence(0x12fcd08?, {0x12fcd08, 0xc003527b80}, {0x0, 0x0}, {0x12fb320, 0xc00a869900}, {0x12fb320, 0xc00ca16d00})
	/Users/vearutop/go/pkg/mod/golang.org/x/exp@v0.0.0-20220414153411-bcd21879b8fd/apidiff/apidiff.go:188 +0x68
golang.org/x/exp/apidiff.(*differ).checkMethodSet(0xc000104ac0, 0xc0034c1540, {0x12fb280?, 0xc009ea18c0?}, {0x12fb280, 0xc00775afc0}, 0x0)
	/Users/vearutop/go/pkg/mod/golang.org/x/exp@v0.0.0-20220414153411-bcd21879b8fd/apidiff/compatibility.go:317 +0x24d
golang.org/x/exp/apidiff.(*differ).checkCompatibleInterface(0xc000104ac0, 0xc0076e4b40?, 0xc0076e4b40?, 0x0?)
	/Users/vearutop/go/pkg/mod/golang.org/x/exp@v0.0.0-20220414153411-bcd21879b8fd/apidiff/compatibility.go:119 +0x8d
golang.org/x/exp/apidiff.(*differ).checkCompatible(0xc000104ac0?, 0xc000104590?, {0x12fb280?, 0xc009ea18c0?}, {0x12fb280?, 0xc00775afc0?})
	/Users/vearutop/go/pkg/mod/golang.org/x/exp@v0.0.0-20220414153411-bcd21879b8fd/apidiff/compatibility.go:13 +0xbb
golang.org/x/exp/apidiff.(*differ).checkCompatibleDefined(0x125de80?, 0xc012aa4c30?, 0xc00b229500, {0x12fb2d0, 0xc0047cd340})
	/Users/vearutop/go/pkg/mod/golang.org/x/exp@v0.0.0-20220414153411-bcd21879b8fd/apidiff/compatibility.go:263 +0x99
golang.org/x/exp/apidiff.(*differ).establishCorrespondence(0xc000104ac0, 0xc00b229500, {0x12fb2d0?, 0xc0047cd340?})
	/Users/vearutop/go/pkg/mod/golang.org/x/exp@v0.0.0-20220414153411-bcd21879b8fd/apidiff/correspondence.go:184 +0x1a5
golang.org/x/exp/apidiff.(*differ).corr(0x2e?, {0x12fb2d0?, 0xc00b229500?}, {0x12fb2d0?, 0xc0047cd340?}, 0x0)
	/Users/vearutop/go/pkg/mod/golang.org/x/exp@v0.0.0-20220414153411-bcd21879b8fd/apidiff/correspondence.go:120 +0x2fc
golang.org/x/exp/apidiff.(*differ).correspond(...)
	/Users/vearutop/go/pkg/mod/golang.org/x/exp@v0.0.0-20220414153411-bcd21879b8fd/apidiff/correspondence.go:17
golang.org/x/exp/apidiff.(*differ).checkCorrespondence(0xc000104ac0?, {0x12fcf88, 0xc0034c1540}, {0x0, 0x0}, {0x12fb2d0, 0xc00b229500}, {0x12fb2d0, 0xc0047cd340})
	/Users/vearutop/go/pkg/mod/golang.org/x/exp@v0.0.0-20220414153411-bcd21879b8fd/apidiff/apidiff.go:188 +0x68
golang.org/x/exp/apidiff.(*differ).checkObjects(0xc000104ac0, {0x12fcf88?, 0xc0034c1540?}, {0x12fcf88?, 0xc01337c910?})
	/Users/vearutop/go/pkg/mod/golang.org/x/exp@v0.0.0-20220414153411-bcd21879b8fd/apidiff/apidiff.go:145 +0x159
golang.org/x/exp/apidiff.(*differ).checkPackage(0xc000104ac0)
	/Users/vearutop/go/pkg/mod/golang.org/x/exp@v0.0.0-20220414153411-bcd21879b8fd/apidiff/apidiff.go:84 +0x513
golang.org/x/exp/apidiff.Changes(0xc0000c6078?, 0x17?)
	/Users/vearutop/go/pkg/mod/golang.org/x/exp@v0.0.0-20220414153411-bcd21879b8fd/apidiff/apidiff.go:26 +0x87
main.makeReleaseReport({_, _}, {{0xc0021f5080, 0x39}, {0x0, 0x0}, {0xc006ef3368, 0x17}, {0xc00107d274, 0x6}, ...}, ...)
	/Users/vearutop/go/pkg/mod/golang.org/x/exp@v0.0.0-20220414153411-bcd21879b8fd/cmd/gorelease/gorelease.go:630 +0x2e7
main.runRelease({0x12fc5d0, 0xc0000989c0}, {0x12fa188, 0xc0000ac008}, {0xc000014044, 0x19}, {0xc0000961e0, 0x0, 0x0})
	/Users/vearutop/go/pkg/mod/golang.org/x/exp@v0.0.0-20220414153411-bcd21879b8fd/cmd/gorelease/gorelease.go:253 +0xec8
main.main()
	/Users/vearutop/go/pkg/mod/golang.org/x/exp@v0.0.0-20220414153411-bcd21879b8fd/cmd/gorelease/gorelease.go:147 +0x18f
exit status 2
@gopherbot gopherbot added this to the Unreleased milestone Apr 22, 2022
@thanm
Copy link
Contributor

thanm commented Apr 22, 2022

Thanks for the report.

This is of course the x/exp repo (see the README there about expectations for support, etc).

@jadekler

@thanm thanm added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 22, 2022
@jeanbza
Copy link
Member

jeanbza commented Apr 22, 2022

Thanks for the report, will investigate.

@jeanbza
Copy link
Member

jeanbza commented Jun 7, 2022

This appears to be an apidiff limitation: it doesn't know how to handle the new *types.TypeParam. I'm working on a fix in https://go-review.googlesource.com/c/exp/+/410855.

@jeanbza
Copy link
Member

jeanbza commented Jun 16, 2022

This issue should be resolved:

deklerk at legate in ~/workspace
$ git clone https://github.com/bool64/cache.git
Cloning into 'cache'...
remote: Enumerating objects: 440, done.
remote: Counting objects: 100% (270/270), done.
remote: Compressing objects: 100% (136/136), done.
remote: Total 440 (delta 175), reused 179 (delta 129), pack-reused 170
Receiving objects: 100% (440/440), 179.21 KiB | 1.47 MiB/s, done.
Resolving deltas: 100% (274/274), done.
deklerk at legate in ~/workspace
$ cd cache
deklerk at legate in ~/workspace/cache on master
$ go run golang.org/x/exp/cmd/gorelease@latest
go: downloading golang.org/x/exp v0.0.0-20220613132600-b0d781184e0d
go: downloading golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3
go: downloading golang.org/x/tools v0.1.10
go: downloading golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
go: downloading golang.org/x/sys v0.0.0-20211019181941-9d821ace8654
# summary
Inferred base version: v0.2.7
Suggested version: v0.3.0

@vearutop let us know if you have any other issues.

@jeanbza jeanbza closed this as completed Jun 16, 2022
@vearutop
Copy link
Contributor Author

Thank you, fixed version seems to work properly in my scenarios. 👍

@rsc rsc unassigned jeanbza Jun 22, 2022
@golang golang locked and limited conversation to collaborators Jun 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge 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

4 participants