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

go/types: documentation on instance de-duplication is unclear about guarantees #51680

Closed
findleyr opened this issue Mar 15, 2022 · 3 comments
Closed
Labels
Documentation Issues describing a change to documentation. FrozenDueToAge

Comments

@findleyr
Copy link
Member

Just re-reading our documentation for instance de-duplication, I don't think we make it clear enough that there are currently no strict guarantees about pointer identity of the instances produced when using a Context.

In my opinion it is worth clarifying this in 1.18.1. Opening this issue to track.

CC @griesemer

@findleyr findleyr self-assigned this Mar 15, 2022
@gopherbot gopherbot added the Documentation Issues describing a change to documentation. label Mar 15, 2022
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/396536 mentions this issue: go/types: clarify that contexts do not guarantee deduplication

@findleyr
Copy link
Member Author

@gopherbot please backport to 1.18, this is important to clarify in our documentation.

@gopherbot
Copy link
Contributor

Backport issue(s) opened: #52028 (for 1.18).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases.

@golang golang locked and limited conversation to collaborators Jun 22, 2023
mateusz834 pushed a commit to mateusz834/tgoast that referenced this issue Dec 31, 2024
Documentation around the use of types.Context is unclear about whether
contexts guarantee deduplication of identical instances. Add explicit
disclaimers that this is not the case.

Fixes golang/go#51680

Change-Id: I6651587315d3cbf9e8d70a69d3e2ec5cedd00da5
Reviewed-on: https://go-review.googlesource.com/c/go/+/396536
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation Issues describing a change to documentation. FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

2 participants