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

Update to standard library context package. #275

Merged
merged 1 commit into from
Mar 30, 2017

Conversation

goller
Copy link
Contributor

@goller goller commented Jan 8, 2017

Go 1.7 added context to the standard library. With Go 1.8 coming soon here is a PR to switch from golang.org/x/net/context to `context.

@dsnet
Copy link
Member

dsnet commented Jan 9, 2017

Thanks for the suggestions. This would break compatibility with Go 1.6 and we generally support the last two versions of Go (1.6 and 1.7). As you've mentioned, Go 1.8 release in soon (less than a month). Let's hold off on this until then, so we don't have to complicate things with build tags.

@adamryman
Copy link

adamryman commented Feb 16, 2017

Go 1.8 is now out, could this be merged in?

@goller
Copy link
Contributor Author

goller commented Mar 7, 2017

Hey there @dsnet, checking up on this. Do you think this is ready to merge?

@zaquestion
Copy link

@dsnet or @neild (you've been active lately) Can this be merged? It is blocking metaverse/truss#148 which prevents us from updating our services to the latest gokit.

@dsnet dsnet merged commit e514ff5 into golang:master Mar 30, 2017
@bcmills
Copy link
Contributor

bcmills commented Mar 30, 2017

Isn't this going to break, like, everybody on AppEngine? (They're still on 1.6, I think.)

A proper fix for this issue is for x/net to use aliases on 1.8.typealias and 1.9.

@mcastilho
Copy link

Well I guess this change got reverted.

@andremarianiello
Copy link

Any explanation for why this was reverted?

@dfawley
Copy link
Contributor

dfawley commented Sep 1, 2017

@andremarianiello, because it doesn't work with grpc, which still imports x/net/context.

Changing this and grpc means breaking backward compatibility, which is important to many of our users.

Meanwhile, if you're on Go1.9, x/net/context is a type alias of context, so they work interchangeably.

If you're using an older version, Go 1.8's fix tool has a recipe for this. go tool fix -force context <src path> should update everything quickly.

@andremarianiello
Copy link

Thanks for the info and the workarounds.

@dsnet
Copy link
Member

dsnet commented Sep 1, 2017

There are people who are still using Go1.8. Given that we usually support the last two releases, I don't think we can reasonably roll-forward this change until all major users are on Go1.9 and above. I also don't want to have the generator produce two different build-tagged files.

@golang golang locked and limited conversation to collaborators Jun 26, 2020
@goller goller deleted the go-context-stdlib branch March 10, 2024 15:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants