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

add a go.mod file #3

Open mvdan opened 2 years ago

mvdan commented 2 years ago

I realise that this library is still usable without being a module directly, but I imagine there's no reason to avoid adding a go.mod file either?

One good reason to add a go.mod file is that one can use commands like go build, go list, and so on. Another is UX: it's not entirely clear that I'm meant to import this as inet.af/netstack rather than github.com/inetaf/netstack if I don't see a go.mod saying as much.

mvdan commented 2 years ago

Huh, the README even mentions and links to a go.mod file in this repository, but it's a 404.

mvdan commented 2 years ago

Seems particularly necessary too, given that this library requires three other modules.

Looks like the file was added/modified in 0407d1a1f063bf6f816db1bd82580f8ad4cb73b3. It hasn't been deleted since, that I can see in the git log. Perhaps one of the git merges somehow dropped the old master history, and entirely replaced it with an upstream history lacking the go.mod file?

bradfitz commented 2 years ago

Whoops. I have a huge complicated abomination of a shell script with gnarly git commands to build this repo and I guess I lost a step in there somewhere.

polynomialspace commented 2 years ago

Looks like it was lost in 1c1bcf45, which just happened to be a few days after google/gvisor@d350c95 bumped go.mod to 1.17.