inetaf / netstack

automated "fork" of gVisor that only contains the netstack bits so the go.mod is smaller. maintained by scripts, not humans.
https://pkg.go.dev/inet.af/netstack
Apache License 2.0
138 stars 5 forks source link

Question about deprecation #4

Open neilalexander opened 2 years ago

neilalexander commented 2 years ago

As of 7585b01ddccf285fc598761f6ce4bd4dd0ee24ee this repository seems to claim it is no longer required, in favour of using the tcpip package from github.com/google/gvisor or gvisor.dev/gvisor directly (claiming that Go 1.17 fixes the lazy loading at least). However, I have been completely unable to move across to upstream.

Trying to substitute the inet.af/netstack/tcpip imports in my own project with gvisor.dev/gvisor/pkg/tcpip results in catastrophic build errors on seemingly all recent commits. Dozens of issues — go mod tidy fails for various reasons, go test ./... reports build errors and my own application fails to build too. I've tried this with various recent commits, including with the release-20211115.0 tag that this repository seemed to last import. Trying this on a Linux machine instead of a Mac produces some different results but still unusable. Both with Go 1.17.

However, release-20211115.0 of inet.af/netstack works perfectly, even on macOS.

With that in mind, is this repository really no longer required? It seems like upstream is totally unusable somehow, and yet none of these issues manifest with inet.af/netstack — this fork works flawlessly. It seems like this repository still very much solves a problem in making netstack usable in isolation.

Am I missing something obvious here?

neilalexander commented 2 years ago

cc'ing @bradfitz for comment.

bradfitz commented 2 years ago

Go 1.17 solved all our problems so @Tailscale moved away from this fork to using upstream directly.

You might need to go mod tidy -compat=1.17.