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

proposal: syscall: reconsider entire package #5616

Closed
mikioh opened this issue Jun 3, 2013 · 7 comments
Closed

proposal: syscall: reconsider entire package #5616

mikioh opened this issue Jun 3, 2013 · 7 comments
Labels
NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. v2 A language change or incompatible library change
Milestone

Comments

@mikioh
Copy link
Contributor

mikioh commented Jun 3, 2013

So far syscall package holds tons of constants, a bit abstracted and raw functions that
wrap syscalls especially for networking stuff.

E.g.,
Constants assigned by IANA (IPPROTO, IFType,), other standard bodies (could be moved
into each specific package)
Set/Getsockopt for Windows
Set/GetsockoptInt,Facilites for Unix variants
Routing sockets, constants for BSD variants
Netlink sockets, constants for Linux

We can reconsider the package shape even under the Go 1 contract.
(and make things easy for bridging btw Go1 and Go2.)
@bradfitz
Copy link
Contributor

Comment 1:

Labels changed: added longterm, go2, removed priority-triage.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 2:

Labels changed: added repo-main.

@rsc
Copy link
Contributor

rsc commented Mar 4, 2014

Comment 3:

Labels changed: added release-none.

@mikioh
Copy link
Contributor Author

mikioh commented Mar 4, 2014

Comment 4:

Now I feel that syscall should keep syscall.Syscall-like functions in and constants and
numbers out.

Labels changed: removed go2.

@mikioh
Copy link
Contributor Author

mikioh commented Mar 4, 2014

Comment 5:

Issue #2999 has been merged into this issue.

@bradfitz bradfitz added v2 A language change or incompatible library change accepted and removed accepted labels Dec 17, 2014
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc changed the title syscall: reconsideration on what syscall package should hold syscall: reconsider entire package Jun 17, 2017
@rsc rsc changed the title syscall: reconsider entire package proposal: syscall: reconsider entire package Jun 17, 2017
@ianlancetaylor
Copy link
Contributor

For Go 2, we should decide whether to simply remove the syscall package from the standard library, and direct people to use golang.org/x/sys instead. We could have a slightly smaller version of the current syscall package in internal/syscall for use by runtime, os, net, and whatever other standard library packages need syscall support.

Our vote is to do this: to remove syscall entirely from Go 2, and use an automated rewriter to change all current uses to use golang.org/x/sys instead.

@ianlancetaylor ianlancetaylor added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Dec 6, 2017
@gopherbot gopherbot removed the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Aug 16, 2019
@gopherbot gopherbot added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Sep 3, 2019
@ianlancetaylor
Copy link
Contributor

Upon further consideration, there are clear uses for the syscall package. Simply removing it isn't feasible.

@ianlancetaylor ianlancetaylor closed this as not planned Won't fix, can't repro, duplicate, stale Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. v2 A language change or incompatible library change
Projects
None yet
Development

No branches or pull requests

5 participants