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/go/buildutil: support comma-delimited build tags in buildutil.TagsFlag #44787

Open
yaaase opened this issue Mar 4, 2021 · 2 comments · May be fixed by golang/tools#268
Open

x/tools/go/buildutil: support comma-delimited build tags in buildutil.TagsFlag #44787

yaaase opened this issue Mar 4, 2021 · 2 comments · May be fixed by golang/tools#268

Comments

@yaaase
Copy link

@yaaase yaaase commented Mar 4, 2021

What version of Go are you using (go version)?

$ go version

go version go1.15.6 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

GO111MODULE="off"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/mbillie/Library/Caches/go-build"
GOENV="/Users/mbillie/Library/Application Support/go/env"
GOEXE=""
GOFLAGS="-mod=vendor"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/mbillie/digitalocean/cthulhu/docode/pkg/mod"
GONOPROXY=".internal.digitalocean.com,github.com/digitalocean"
GONOSUMDB="
.internal.digitalocean.com,github.com/digitalocean"
GOOS="darwin"
GOPATH="/Users/mbillie/digitalocean/cthulhu/docode:/home/mbillie/digitalocean:/home/mbillie/go"
GOPRIVATE="*.internal.digitalocean.com,github.com/digitalocean"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.15.6/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.15.6/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/w5/jt734dx51w7c9sq8spdrb_6r0000gs/T/go-build425061423=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

I would like to allow tools in the community to support the same format for build tags (e.g. comma delimited) as the go tool supports. Space separate tags have been deprecated in the go tool. This brings parity to tools that rely on golang.org/x/tools/go/build : see https://go-review.googlesource.com/c/tools/+/284214#message-fc9907b03ae75ae24145f421e623330b4b9b9158

@ALTree ALTree changed the title Support comma-delimited build tags in buildutil.TagsFlag x/tools/go/buildutil: support comma-delimited build tags in buildutil.TagsFlag Mar 4, 2021
@gopherbot gopherbot added the Tools label Mar 4, 2021
@gopherbot gopherbot added this to the Unreleased milestone Mar 4, 2021
@ALTree ALTree added the Tools label Mar 4, 2021
@bcmills
Copy link
Member

@bcmills bcmills commented Mar 5, 2021

I note, per https://tip.golang.org/cmd/go/#hdr-Compile_packages_and_dependencies:

-tags tag,list
	a comma-separated list of build tags to consider satisfied during the
	build. For more information about build tags, see the description of
	build constraints in the documentation for the go/build package.
	(Earlier versions of Go used a space-separated list, and that form
	is deprecated but still recognized.)

So this seems fine to add to go/buildutil.

CC @stamblerre @alandonovan

Loading

@gopherbot
Copy link

@gopherbot gopherbot commented Mar 5, 2021

Change https://golang.org/cl/284214 mentions this issue: Allow buildutil.TagsFlag to handle comma-delimited tag lists

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

4 participants