-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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/net/http2/h2demo: has started to cause x/net builders to fail #34361
Comments
Change https://golang.org/cl/196036 mentions this issue: |
Change https://golang.org/cl/196097 mentions this issue: |
I prototyped the idea of removing the So, that solution seems to be viable. This issue still needs decision; I just wanted to check that removing the build constraint would actually work to fix the issue. |
SGTM |
The h2demo command is an internal command that we use to powers the https://http2.golang.org server, it is not a package that others import. It was never tested before golang.org/issue/34361 because it had a +build h2demo constraint. But that build constraint is being removed, so explicitly skip testing it in GOPATH mode. The package is supported only in module mode now, since it requires third-party dependencies. Updates golang/go#34361 Change-Id: Ia3870baa10688b83f8400b1a5e13824a1c1b3d3b Reviewed-on: https://go-review.googlesource.com/c/build/+/196097 Reviewed-by: Brad Fitzpatrick <[email protected]>
Change https://golang.org/cl/198917 mentions this issue: |
The build constraint is no longer useful. It doesn't prevent this package contributing module requirements to x/net, that was already resolved by carving h2demo into its own module in golang/go#30685. Few people do go get -u golang.org/x/net/... in GOPATH mode by now, so there's no need to optimize for avoiding polluting GOPATH/bin. Removing the build constraint allows the package to be visible and tested by trybots and builders. It's also simpler. Updates golang/go#34361 Change-Id: I84b5d70aab210ca8e4f5494160ae4d9049ef08ad Reviewed-on: https://go-review.googlesource.com/c/net/+/196036 Run-TryBot: Dmitri Shuralyov <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]> (cherry picked from commit a8b05e9) Reviewed-on: https://go-review.googlesource.com/c/net/+/198917
The h2demo command is an internal command that we use to powers the https://http2.golang.org server, it is not a package that others import. It was never tested before golang.org/issue/34361 because it had a +build h2demo constraint. But that build constraint is being removed, so explicitly skip testing it in GOPATH mode. The package is supported only in module mode now, since it requires third-party dependencies. Updates golang/go#34361 Change-Id: Ia3870baa10688b83f8400b1a5e13824a1c1b3d3b Reviewed-on: https://go-review.googlesource.com/c/build/+/196097 Reviewed-by: Brad Fitzpatrick <[email protected]>
The build constraint is no longer useful. It doesn't prevent this package contributing module requirements to x/net, that was already resolved by carving h2demo into its own module in golang/go#30685. Few people do go get -u golang.org/x/net/... in GOPATH mode by now, so there's no need to optimize for avoiding polluting GOPATH/bin. Removing the build constraint allows the package to be visible and tested by trybots and builders. It's also simpler. Fixes golang/go#34361 Change-Id: I84b5d70aab210ca8e4f5494160ae4d9049ef08ad Reviewed-on: https://go-review.googlesource.com/c/net/+/196036 Run-TryBot: Dmitri Shuralyov <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
Issue #32528 has been resolved and all inner modules in x/net are being tested now, which includes the
golang.org/x/net/http2/h2demo
module. It contains a single package, which is a command with an// +build h2demo
build constraint.This is currently causing the x/net builders to report a failure, because the
go test
command reports a non-zero exit code when given an import path pattern that matches no packages:This makes x/net builders fail:
We have to fix x/net builders, but need to decide how.
Possible Solutions
My first suggestion would be to remove the
h2demo
build constraint. If I understand correctly, it was used whenh2demo
was created in 2015, before modules, and it was a probably a way to make it not appear in users' $GOPATH/bin when they didgo get -u golang.org/x/net/...
and to avoid its dependencies from being fetched.The
h2demo
command was carved out into a separate module in #30685 to resolve the issue of it contributing too many dependencies to x/net. I think the build constraint isn't needed anymore, but let me know what you think.An alternative solution is to come up with a way to allow a module with zero packages to not cause a test failure. But this option doesn't seem very good.
/cc @bradfitz @jayconrod
The text was updated successfully, but these errors were encountered: