go: cmd/compile: internal compiler error: method Len on *uint8 not found
What version of Go are you using (go version
)?
$ go version go version go1.19 darwin/arm64
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="arm64" GOBIN="" GOCACHE="/Users/andig/Library/Caches/go-build" GOENV="/Users/andig/Library/Application Support/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="arm64" GOHOSTOS="darwin" GOINSECURE="" GOMODCACHE="/Users/andig/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="darwin" GOPATH="/Users/andig/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/Users/andig/sdk/go1.19" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/Users/andig/sdk/go1.19/pkg/tool/darwin_arm64" GOVCS="" GOVERSION="go1.19" GCCGO="gccgo" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/Users/andig/htdocs/evcc/yorkie/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 arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/sv/rs_453y57xj86xsbz3kw1mbc0000gn/T/go-build2796829895=/tmp/go-build -gno-record-gcc-switches -fno-common" GOROOT/bin/go version: go version go1.19 darwin/arm64 GOROOT/bin/go tool compile -V: compile version go1.19 uname -v: Darwin Kernel Version 21.6.0: Sat Jun 18 17:05:47 PDT 2022; root:xnu-8020.140.41~1/RELEASE_ARM64_T8101 ProductName: macOS ProductVersion: 12.5 BuildVersion: 21G72 lldb --version: lldb-1316.0.9.46 Apple Swift version 5.6.1 (swiftlang-5.6.0.323.66 clang-1316.0.20.12)
What did you do?
Build https://github.com/yorkie-team/yorkie by running
go build ./...
What did you expect to see?
Success
What did you see instead?
go1.19 build ./...
go: downloading go.mongodb.org/mongo-driver v1.9.1
go: downloading github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
go: downloading github.com/stretchr/testify v1.7.5
go: downloading github.com/hashicorp/go-immutable-radix v1.3.1
go: downloading go.etcd.io/etcd/client/pkg/v3 v3.5.4
go: downloading github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a
go: downloading github.com/coreos/go-semver v0.3.0
go: downloading github.com/go-stack/stack v1.8.1
go: downloading github.com/golang/snappy v0.0.4
go: downloading github.com/xdg-go/scram v1.1.1
go: downloading github.com/xdg-go/stringprep v1.0.3
go: downloading github.com/coreos/go-systemd/v22 v22.3.2
go: downloading github.com/xdg-go/pbkdf2 v1.0.0
# github.com/yorkie-team/yorkie/pkg/document/json
pkg/document/json/rga_tree_split.go:302:29: internal compiler error: method Len on *uint8 not found
The code is in https://github.com/yorkie-team/yorkie/blob/main/pkg/document/json/rga_tree_split.go#L299 which uses generics.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 20 (13 by maintainers)
Commits related to this issue
- cmd/compile: skip emitting dictionaries with missing method expressions The nounified frontend currently tries to construct dictionaries that correspond to invalid instantiations (i.e., instantiation... — committed to golang/go by mdempsky 2 years ago
- [release-branch.go1.19] cmd/compile: skip emitting dictionaries with missing method expressions The nounified frontend currently tries to construct dictionaries that correspond to invalid instantiati... — committed to golang/go by mdempsky 2 years ago
- [release-branch.go1.19] cmd/compile: skip emitting dictionaries with missing method expressions The nounified frontend currently tries to construct dictionaries that correspond to invalid instantiati... — committed to tailscale/go by mdempsky 2 years ago
- [release-branch.go1.19] cmd/compile: skip emitting dictionaries with missing method expressions The nounified frontend currently tries to construct dictionaries that correspond to invalid instantiati... — committed to tailscale/go by mdempsky 2 years ago
- [release-branch.go1.19] cmd/compile: skip emitting dictionaries with missing method expressions The nounified frontend currently tries to construct dictionaries that correspond to invalid instantiati... — committed to tailscale/go by mdempsky 2 years ago
@cuonglm Not yet. It’s still a regression from 1.18 to 1.19, which deserves a backport fix if we can prepare one that we have confidence in.
Fixed at tip by CL 429655.
Further minimized: https://go.dev/play/p/WU6EOKRqM_V
It seems to be an issue around creating subdictionaries with derived types for the
Two[Node[V]]()
call, and that we’re creating the dictionary with the shaped type argument instead of the unshaped one.As this is working at tip, maybe we can close this and open a backport issue, where we can discuss the approach and risk of backporting? Thanks.
Not fully minimized yet, but at least a standalone repro:
@andig I get it. My repo is private still. Can’t be made public yet. Trying to reproduce in small public example that won’t get me fired 😃 but the error is hard to reproduce consistently