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

x/time/rate: use context package from Go 1.7+ #16745

Closed
gyuho opened this issue Aug 16, 2016 · 3 comments
Closed

x/time/rate: use context package from Go 1.7+ #16745

gyuho opened this issue Aug 16, 2016 · 3 comments

Comments

@gyuho
Copy link
Contributor

gyuho commented Aug 16, 2016

Hope this is the right place to ask this question.

Could anybody provide some timeline on switching golang.org/x/net/context to context?
When would this happen?

Reference

Thanks!

@gyuho gyuho mentioned this issue Aug 16, 2016
26 tasks
@bradfitz
Copy link
Contributor

They're mostly compatible, so we'll probably keep external libraries using golang.org/x/net/context for awhile so we don't break Go 1.6 users.

That is, you can use a stdlib context.Context and pass it to a function taking a golang.org/x/net/context.

There are some cases where it's not as nice, but it mostly works out.

Did you hit specific problems?

If we had type aliases (#16339) this would've been less gross.

@gyuho
Copy link
Contributor Author

gyuho commented Aug 16, 2016

@bradfitz We don't have any problem. Just trying to plan in advance, along with grpc.

As you suggest, we can just keep external context for awhile.

We will revisit this if we hit any problem. Thanks!

@gyuho gyuho closed this as completed Aug 16, 2016
@bradfitz bradfitz reopened this Apr 20, 2017
@bradfitz bradfitz self-assigned this Apr 20, 2017
@gopherbot gopherbot added this to the Unreleased milestone Apr 20, 2017
@gopherbot
Copy link
Contributor

CL https://golang.org/cl/41194 mentions this issue.

gopherbot pushed a commit to golang/time that referenced this issue Apr 24, 2017
https://golang.org/cl/41194 updatd the x/time/rate package to use the
standard library's context package for golang/go#16745 but App Engine
is stuck 14 months in the past and can only run Go 1.6, which lacks
context.

This CL restores Go 1.6 support.

The Go build system stopped testing packages against Go 1.6 once Go
1.8 came out, so just disable the tests for Go 1.6 rather than jumping
through hoops to make them work.

Change-Id: I271dcd492dd0ca53961340d63b26facb5dbdf025
Reviewed-on: https://go-review.googlesource.com/41624
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
@golang golang locked and limited conversation to collaborators Apr 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants