Description
The golang.org/x/net module holds supplementary Go networking libraries. It currently requires 5 modules:
require (
cloud.google.com/go v0.36.0
go4.org v0.0.0-20190218023631-ce4c26f7be8e
golang.org/x/build v0.0.0-20190307215223-c78805dbabc8
golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2
)
The h2demo
package is single-handedly responsible for x/net requiring cloud.google.com/go
, go4.org
, and golang.org/x/build
modules (it has a // +build h2demo
build constraint, but that doesn't have any effect when computing module requirements):
The x/net module should not be requiring x/build (and in turn, the world, due to #29935).
If the h2demo
package is removed, the list of required modules in x/net becomes just:
require (
golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2
)
I see 2 possible paths to resolve this:
- move h2demo somewhere else (to x/build?)
- make h2demo a separate module in x/net by adding a go.mod file to it, in effect cutting it and its required modules off from the rest of x/net
Based on the content of the h2demo directory and the fact it's a part of our infrastructure (i.e., it's the server powering http2.golang.org), I suggest we move h2demo to x/build. It can use the http2 package by requiring x/net module. @bradfitz How does that sound to to you?