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

grpc contextPkgPath should use "context" #390

Open
hzxuzhonghu opened this issue Feb 28, 2018 · 9 comments
Open

grpc contextPkgPath should use "context" #390

hzxuzhonghu opened this issue Feb 28, 2018 · 9 comments

Comments

@hzxuzhonghu
Copy link

hzxuzhonghu commented Feb 28, 2018

As of Go 1.7 this package(golang.org/x/net/context) is available in the standard library under the name context. https://golang.org/pkg/context. So we should replace grpc contextPkgPath golang.org/x/net/context with context

@awalterschulze
Copy link
Member

I am going to wait for golang/protobuf to fix this first
golang/protobuf#537

@hzxuzhonghu
Copy link
Author

ok

@awalterschulze
Copy link
Member

Sorry that this issue has been delayed for so long.

@saturn4er
Copy link

Hi @awalterschulze, golangprotobuf have already merged fix.

@awalterschulze
Copy link
Member

Yes it has been merged into their dev branch.
This is a piece of work, of which I have completed the biggest part on the upstream branch.
I will merge this into gogo/protobuf's dev branch and continue to merge all the commits of their dev branch.
If you want to help, it would be great if you could test the upstream branch on your own code base.

@dsnet
Copy link

dsnet commented Apr 13, 2018

FYI, it's been reverted again... see golang/protobuf#580.
I'm pushing for Go protobufs to drop Go1.6 support.

@awalterschulze
Copy link
Member

whop whop :)

Thank you for pushing @dsnet

@dfawley
Copy link

dfawley commented Apr 16, 2018

I'm pushing for Go protobufs to drop Go1.6 support.

Note that support for Go 1.6 is orthogonal to which context package is imported. We should not change grpc or its plugin to import "context" until 1.9 is the oldest supported version (for type aliases). Also note that anyone using Go 1.9 or later shouldn't care how context is imported.

grpc/grpc-go#711

@thaJeztah
Copy link

Looks like this was addressed now through 92e5581 (#533)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants