Open sh1yu opened 3 days ago
Thank you for reporting this issue. gRPC now requires Go version 1.22.7 or higher, as specified in here https://github.com/grpc/grpc-go/blob/1418e5ecc61a044aeda9816cfbed7062894acc08/go.mod#L3 Please update your Go installation to resolve this. If the issue persists, please let us know, and we’ll be happy to assist further.
It would be helpful if there was a place that could introduce the minimum supported Go versions for each version of gRPC since it's not very convenient to upgrade Go version for some older programs.
The minimum go version for each version of gRPC is mentioned in the go.mod file for each version. For gRPC@v1.66.2, the minimum supported version is go 1.21 mentioned here: https://github.com/grpc/grpc-go/blob/a75eb1eeeaa9b665a0bca025b61025b2d9d13813/go.mod#L3
What version of gRPC are you using?
grpc@v1.66.2
What version of Go are you using (
go version
)?1.18
What operating system (Linux, Windows, …) and version?
wsl2
What did you do?
If possible, provide a recipe for reproducing the error. protoc --go_out=. --go-grpc_out=. 111.proto go build abc.go
What did you expect to see?
go build successfully
What did you see instead?
/home/xxx/.go/pkg/mod/google.golang.org/grpc@v1.66.2/experimental/stats/metricregistry.go:22:2: package maps is not in GOROOT (/home/xxx/apps/go1.18/src/maps) /home/xxx/.go/pkg/mod/google.golang.org/grpc@v1.66.2/clientconn.go:27:2: package slices is not in GOROOT (/home/xxx/apps/go1.18/src/slices)