-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
internal/singleflight: delete, use golang.org/x/sync/singleflight #31697
Comments
Change https://golang.org/cl/174080 mentions this issue: |
Another step to re-unify them is:
I vote for 1st point, 2nd point will break current user of golang.org/x/sync/singleflight out there. How do you think @bradfitz ? |
We can't break (change) the x/sync/singleflight public API. We can add a new method, though. |
If |
@tarndt Use |
Change https://go.dev/cl/423654 mentions this issue: |
Change https://go.dev/cl/423655 mentions this issue: |
@cuonglm, rather than delete The (Unless you want to wait for #53427; but that could be a long time) |
That sounds interesting, but I think we still need to wait until we bump the bootstrap version to 1.18 at least, for supporting generic? The main motivation is that we should unify them, so we need to maintain one version only. |
Ah never mind, we don't have to, since when singleflight is only used in std, not during bootstrap tools. |
So next CLs can revert changes to "internal/singleflight" in CL #82795, then replace it with "golang.org/x/sync/singleflight" instead. For #31697 Change-Id: I873ce30d7e051539aa6dc5d4f21e558869a6d132 Reviewed-on: https://go-review.googlesource.com/c/go/+/423654 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
So next CL can delete "internal/singleflight" and vendor "golang.org/x/sync/singleflight" instead. For #31697 Change-Id: I020da1e5a48d484637b538c010029218f5a4a744 Reviewed-on: https://go-review.googlesource.com/c/go/+/423655 Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Change https://go.dev/cl/425187 mentions this issue: |
The singleflight package started life in internal/singleflight and then moved to golang.org/x/sync/singleflight, and the two have had slightly divergent development histories since. It's getting kinda messy. Their APIs have even somewhat diverged.
I just tried to re-unify them and delete internal/singleflight from std, but we can't use mod/vendor packages during bootstrap.
/cc @ianlancetaylor
The text was updated successfully, but these errors were encountered: