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

"package maps is not in GOROOT" with go1.18 #7646

Closed
sh1yu opened this issue Sep 18, 2024 · 5 comments
Closed

"package maps is not in GOROOT" with go1.18 #7646

sh1yu opened this issue Sep 18, 2024 · 5 comments
Assignees
Labels
Area: Codegen Includes anything related to protoc-gen-go-grpc. Status: Requires Reporter Clarification Type: Bug

Comments

@sh1yu
Copy link

sh1yu commented Sep 18, 2024

What version of gRPC are you using?

[email protected]

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/[email protected]/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/[email protected]/clientconn.go:27:2: package slices is not in GOROOT (/home/xxx/apps/go1.18/src/slices)

@eshitachandwani eshitachandwani self-assigned this Sep 19, 2024
@eshitachandwani
Copy link
Member

eshitachandwani commented Sep 19, 2024

Thank you for reporting this issue. gRPC now requires Go version 1.22.7 or higher, as specified in here

go 1.22.7

Please update your Go installation to resolve this. If the issue persists, please let us know, and we’ll be happy to assist further.

@sh1yu
Copy link
Author

sh1yu commented Sep 19, 2024

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.

@eshitachandwani
Copy link
Member

The minimum go version for each version of gRPC is mentioned in the go.mod file for each version. For [email protected], the minimum supported version is go 1.21 mentioned here:

go 1.21

@purnesh42H
Copy link
Contributor

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.

@sh1yu gRPC promises to support till any of the last two go releases. See https://github.com/grpc/grpc-go?tab=readme-ov-file#prerequisites

@purnesh42H purnesh42H added the Area: Codegen Includes anything related to protoc-gen-go-grpc. label Sep 23, 2024
@sh1yu
Copy link
Author

sh1yu commented Sep 25, 2024

well,version v1.57.2 support go1.18:

go 1.18

require (
    google.golang.org/grpc v1.57.2
    google.golang.org/protobuf v1.34.1
)

@sh1yu sh1yu closed this as completed Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Codegen Includes anything related to protoc-gen-go-grpc. Status: Requires Reporter Clarification Type: Bug
Projects
None yet
Development

No branches or pull requests

3 participants