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
cmd/go: document build constraints in 'go help' #37018
Comments
The build tag in the filename is preventing the test from being run. Having |
It would be nice if that were documented somewhere in ordinary help, rather than hoping users will paw through the source code. |
This is documented. From https://golang.org/pkg/go/build
|
I agree with this. Build constraints are mentioned a few times in https://golang.org/cmd/go/, but they aren't defined. There's only one reference to the I think we should add a |
This is not true; the feature is pretty clearly documented in the https://golang.org/pkg/go/build section I pasted above (I mean the filename thing that is the topic of this issue). |
Very true, but I don't think it's enough. If you're reading |
@jayconrod I can work on this one. I'll add |
@mlowicki Thanks for looking at this. I don't think the documentation in |
Change https://golang.org/cl/228017 mentions this issue: |
Reopening this. @rsc pointed out there's no need to document build constraints in two places. I'll send a CL that does this shortly. |
Change https://golang.org/cl/232981 mentions this issue: |
Fixes golang#37018 Change-Id: I1d32c1cb432bc2d7a4d8d6b5c3a54fee558141ec Reviewed-on: https://go-review.googlesource.com/c/go/+/228017 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
Change https://golang.org/cl/248038 mentions this issue: |
This is the start of the Go 1.16 development cycle, so update the Version value accordingly. It represents the Go 1.x version that will soon open up for development (and eventually become released). Historically, we used to bump this at an arbitrary time throughout the development cycle, but it's better to be more predictable about updating it. The start of a development cycle should be the most appropriate time: it clearly marks the boundary between 1.15 and 1.16 development, and doing it early can help catch issues in other tooling. See issue #38704 for more background. There is no longer a need to update the list of Go versions in src/go/build/doc.go because it does not exist as of CL 232981. For #40705. Updates #38704. Updates #37018. Change-Id: Id8ee733b5e79c53b6cd03509c6560614d8743833 Reviewed-on: https://go-review.googlesource.com/c/go/+/248038 Reviewed-by: Carlos Amedee <carlos@golang.org>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
In x/tools/internal/lsp/span/uri_windows_test.go I removed // +build window, and renamed the test function to TestURIA (to avoid conflicts with uri_test.go)
I then ran go test -run URI .
What did you expect to see?
I expected to see it run TestURI (from uri_test.go) and TestURIA (from uri_windows_test.go)
What did you see instead?
It just ran TestURI
[If I rename uri_window_test.go then go test will run TestURIA]
The text was updated successfully, but these errors were encountered: