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

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

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

yaaase opened this issue Mar 4, 2021 · 6 comments · May be fixed by golang/tools#268
Labels
FeatureRequest NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@yaaase
Copy link

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
@ALTree ALTree added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Mar 4, 2021
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Mar 4, 2021
@ALTree ALTree added FeatureRequest and removed Tools This label describes issues relating to any tools in the x/tools repository. labels Mar 4, 2021
@gopherbot gopherbot added this to the Unreleased milestone Mar 4, 2021
@ALTree ALTree added the Tools This label describes issues relating to any tools in the x/tools repository. label Mar 4, 2021
@bcmills
Copy link
Contributor

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

@bcmills bcmills added the NeedsFix The path to resolution is known, but the work has not been done. label Mar 5, 2021
@gopherbot gopherbot removed the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Mar 5, 2021
@gopherbot
Copy link

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

@aykevl
Copy link

aykevl commented Jan 19, 2024

Any update on this? We'd like to support commas in build tags in TinyGo and it would be really nice if we could keep using buildutil.TagsFlag.

@adonovan
Copy link
Member

adonovan commented Jan 19, 2024

Seems like https://golang.org/cl/284214 has been languishing. Would you be willing to nudge it across the finish line (in other words, take it over)? It doesn't look very hard.

@omnide
Copy link

omnide commented Jan 23, 2024

I'll pick this up.

@gopherbot
Copy link

Change https://go.dev/cl/558115 mentions this issue: go/buildutil: permit comma delimiters in build tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants