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

net: consolidate fake/simulated stuff for JS and NaCl #30324

Open
mikioh opened this Issue Feb 20, 2019 · 2 comments

Comments

Projects
None yet
4 participants
@mikioh
Copy link
Contributor

mikioh commented Feb 20, 2019

This is a proposal to merge the fake network functionality on JS and the simulated network functionality on NaCl into new built-in simulated network functionality in the package net for the sake of maintenance.

Problem: The fake stuff on JS is incomplete, causes #19229 and similar issues and disables most of the test cases in the package net. It also introduced unnecessary dependencies on the packages in the standard library as "stuff making compiler happy."

Solution: To make new simulated network functionality based on NaCl's. The new functionality in a single code is able to run on both JS and NaCl without functional degradation from the existing NaCl's.

Bonus: Probably we are able to use host-local IPv6 functionality on the play.golang.org.

@gopherbot gopherbot added this to the Proposal milestone Feb 20, 2019

@gopherbot gopherbot added the Proposal label Feb 20, 2019

@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Feb 27, 2019

It seems fine to merge the two - just don't expose any new public API in the process.
Is it just a matter of renaming *_nacl.go to *_fake.go and adding build tags?

@bcmills bcmills added the NeedsFix label Feb 28, 2019

@bcmills bcmills changed the title proposal: net: consolidate fake/simulated stuff for JS and NaCl net: consolidate fake/simulated stuff for JS and NaCl Feb 28, 2019

@bcmills bcmills modified the milestones: Proposal, Unplanned Feb 28, 2019

@bcmills bcmills removed the Proposal label Feb 28, 2019

@mikioh

This comment has been minimized.

Copy link
Contributor Author

mikioh commented Mar 1, 2019

just don't expose any new public API in the process.

No new APIs, some deprecated APIs in the package syscall.

Is it just a matter of renaming *_nacl.go to *_fake.go and adding build tags?

Some more. The CL, http://golang.org/cl/120958, chops syscall/net_nacl.go into net/fd_fake.go and net/ipsock_fake.go, fills missing/broken features required for testing, and a few cleanups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.