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

add back Context type as alias to context.Context #148

Merged
merged 1 commit into from
Mar 31, 2021
Merged

add back Context type as alias to context.Context #148

merged 1 commit into from
Mar 31, 2021

Conversation

dsnet
Copy link
Member

@dsnet dsnet commented Mar 30, 2021

Pull request #131 deleted the Context declaration,
which broke most usages of this package since users needed to implement
the interfaces mentioned in this package by referencing the
groupcache.Context type. However, that type was removed from peers.go
in the mentioned pull request.

Technically, #131 is a breaking change since groupcache.Context
was an interface{}, and the PR switched it to be context.Context.
Fortunately, it seems that all users are passing a context.Context
anyways so that the type safety just checks out.

However, most users are still referencing groupcache.Context.

Pull request #131 deleted the Context declaration,
which broke most usages of this package since users needed to implement
the interfaces mentioned in this package by referencing the
groupcache.Context type. However, that type was removed from peers.go
in the mentioned pull request.

Technically, #131 is a breaking change since groupcache.Context
was an interface{}, and the PR switched it to be context.Context.
Fortunately, it seems that all users are passing a context.Context
anyways so that the type safety just checks out.

However, most users are still referencing groupcache.Context.
@dsnet
Copy link
Member Author

dsnet commented Mar 30, 2021

\cc @neild @bradfitz @desimone

@dmitshur dmitshur merged commit 41bb18b into golang:master Mar 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants