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/compile: internal compiler error: method Len on *uint8 not found #54225

Open
andig opened this issue Aug 3, 2022 · 3 comments
Open

cmd/compile: internal compiler error: method Len on *uint8 not found #54225

andig opened this issue Aug 3, 2022 · 3 comments
Assignees
Labels
compiler/runtime generics NeedsInvestigation
Milestone

Comments

@andig
Copy link
Contributor

@andig andig commented Aug 3, 2022

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.

Refs: yorkie-team/yorkie#378

@cuonglm
Copy link
Member

@cuonglm cuonglm commented Aug 3, 2022

git bisect points to https://go-review.googlesource.com/c/go/+/385274 cc @randall77

@cuonglm cuonglm added NeedsInvestigation generics labels Aug 3, 2022
@andig
Copy link
Contributor Author

@andig andig commented Aug 3, 2022

It does build with GOEXPERIMENT=unified

@dmitshur dmitshur added this to the Go1.20 milestone Aug 3, 2022
@dmitshur
Copy link
Contributor

@dmitshur dmitshur commented Aug 3, 2022

CC @golang/compiler.

@dmitshur dmitshur changed the title go/build: internal compiler error: method Len on *uint8 not found cmd/compile: internal compiler error: method Len on *uint8 not found Aug 3, 2022
@gopherbot gopherbot added the compiler/runtime label Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime generics NeedsInvestigation
Projects
Status: Todo
Development

No branches or pull requests

5 participants