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
runtime: move internals to internal/runtime
#65355
Comments
I really like the idea of having a |
Change https://go.dev/cl/559076 mentions this issue: |
For golang#65355 Change-Id: I32f37b2971996d50451505e412157dd49b29f581
Change https://go.dev/cl/559675 mentions this issue: |
Change https://go.dev/cl/559715 mentions this issue: |
Change https://go.dev/cl/560155 mentions this issue: |
Change https://go.dev/cl/560136 mentions this issue: |
Change https://go.dev/cl/560395 mentions this issue: |
Change https://go.dev/cl/560596 mentions this issue: |
For golang#65355 Change-Id: If676bffe28ae3f20e4ed15a56993811bee05ef22
Change https://go.dev/cl/562296 mentions this issue: |
For #65355 Change-Id: I5fefe30dcb520159de565e61dafc74a740fc8730 Reviewed-on: https://go-review.googlesource.com/c/go/+/559715 Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
For #65355 Change-Id: I9168d9a767e3b2ece65ac6dcab6827ab6f6b11bb Reviewed-on: https://go-review.googlesource.com/c/go/+/560136 Reviewed-by: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com> Auto-Submit: Ian Lance Taylor <iant@golang.org>
For #65355 Change-Id: I65dd090fb99de9b231af2112c5ccb0eb635db2be Reviewed-on: https://go-review.googlesource.com/c/go/+/560155 Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ibrahim Bazoka <ibrahimbazoka729@gmail.com> Auto-Submit: Emmanuel Odeke <emmanuel@orijtech.com>
For golang#65355 Change-Id: I42c04ade295d2900f55596ad2f223c9c93dd740f
Change https://go.dev/cl/580536 mentions this issue: |
Right now package runtime appears to serve two purposes:
runtime.GOMAXPROCS
, etc).At first glance, this seems perfectly normal and reasonable, however there is actually a third purpose:
std
-internal APIs that should not be world-public. e.g.,runtime.semacquire
forsync.Mutex
orruntime.netpollopen
foros
andnet
.These APIs should not be public to the whole world as they are implementation details that may change. However, with the current layout there is no good way to expose these internal APIs, so we must use
//go:linkname
between packages, and in some cases copy entire type definitions between packages (#64549).If we move most of the runtime implementation to
internal/runtime
, then it could expose a richer API surface useful to other packages instd
, but nothing outside ofstd
would be able to access them due to the rules ofinternal
. Packageruntime
would remain to provide the same API, but it would be much smaller and simply importinternal/runtime
for most functionality.In moving, there are also opportunities for cleanup along the lines of #51087. e.g., perhaps the timer implementation is in
internal/runtime/timer
, etc. Though this move isn't really a prerequisite for that; we could do that inruntime/internal/timer
as well.This change would technically be solely an implementation detail, though in practice there are likely symbols that folks depend on anyway, either via linkname (https://go.dev/cl/548235) or implicitly by looking for in profiles, stack traces, etc.
cc @golang/runtime
The text was updated successfully, but these errors were encountered: