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

Closed
mikioh opened this issue Feb 20, 2019 · 3 comments
Closed

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

mikioh opened this issue Feb 20, 2019 · 3 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@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
@rsc
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 The path to resolution is known, but the work has not been done. 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
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.

@bradfitz
Copy link
Contributor

bradfitz commented Oct 8, 2019

Closing nacl bugs, as we're removing nacl (#30439)

If all that's left is js/wasm here, there's nothing to unify. (See https://go-review.googlesource.com/c/go/+/199499 which renames some *_nacljs.go files to *_js.go)

@bradfitz bradfitz closed this as completed Oct 8, 2019
@golang golang locked and limited conversation to collaborators Oct 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants