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

x/tools/cmd/bundle: use caller's module version, not $GOPATH #32031

bradfitz opened this issue May 14, 2019 · 2 comments


None yet
4 participants
Copy link

commented May 14, 2019

There are two bundled packages in $GOROOT/src/net/http:

bradfitz@go:~/go/src/net/http$ git grep go:gener
h2_bundle.go://go:generate bundle -o h2_bundle.go -prefix http2
socks_bundle.go://go:generate bundle -o socks_bundle.go -dst net/http -prefix socks -underscore

A bundled package is a a package that gets fused in with another package to avoid an otherwise-circular dependency. (We can't just import from net/http as http2 implements interfaces using types in their signatures defined in net/http)

Currently, to update http2 in std you need to both update the go.mod+vendor files (for some of the http2 subpackages) as well as run the go generate bundle step to generate h2_bundle.go.

The bundle appears to just gets it code from whatever you have on your disk in $GOPATH, though. It should use the same version from the current module ($GOROOT/src/go.mod).

/cc @bcmills @jayconrod @alandonovan @dmitshur @ianlancetaylor

@gopherbot gopherbot added this to the Unreleased milestone May 14, 2019


This comment has been minimized.

Copy link

commented May 14, 2019

Change mentions this issue: net/http: update vendored, bundled x/net/http2


This comment has been minimized.

Copy link

commented May 15, 2019

bundle currently uses to load packages. At first glance, this issue is about making it use instead, which will make it support modules.

Added bundle to #24661.

/cc @ianthehat @matloob

gopherbot pushed a commit that referenced this issue May 16, 2019

net/http: update vendored, bundled x/net/http2

    http2: track reused connections (updates #31982)

Some x/sys/unix updates come along for the ride too.

I filed #32031 for making the bundling process less difficult and
error-prone in the future.

Change-Id: Ic822080991ffa2d50352c5f613e45648a327cf16
Run-TryBot: Brad Fitzpatrick <>
Reviewed-by: Ian Lance Taylor <>
TryBot-Result: Gobot Gobot <>
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.