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

cmd/go/internal/list: Wildcard expansion inside testdata does not work #38470

Open
tbe opened this issue Apr 15, 2020 · 3 comments
Open

cmd/go/internal/list: Wildcard expansion inside testdata does not work #38470

tbe opened this issue Apr 15, 2020 · 3 comments
Labels
GoCommand cmd/go NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@tbe
Copy link

tbe commented Apr 15, 2020

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

$ go version
go version go1.14 linux/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=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/tbe/.cache/go-build"
GOENV="/home/tbe/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/tbe/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/x86_64-pc-linux-gnu/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/x86_64-pc-linux-gnu/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="x86_64-pc-linux-gnu-cc"
CXX="x86_64-pc-linux-gnu-c++"
CGO_ENABLED="1"
GOMOD="/home/tbe/repos/go/packagesTest/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="x86_64-pc-linux-gnu-pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build133136046=/tmp/go-build -gno-record-gcc-switches"

What did you do?

$ go list k8s.io/gengo...
k8s.io/gengo/args
k8s.io/gengo/examples/deepcopy-gen
k8s.io/gengo/examples/deepcopy-gen/generators
k8s.io/gengo/examples/deepcopy-gen/output_tests
[...]
$ go list k8s.io/gengo/testdata/a
k8s.io/gengo/testdata/a
$ go list k8s.io/gengo/testdata/a...
go: warning: "k8s.io/gengo/testdata/a..." matched no packages
$ go list k8s.io/gengo/testdata/a/b
k8s.io/gengo/testdata/a/b

What did you expect to see?

$ go list k8s.io/gengo/testdata/a...
k8s.io/gengo/testdata/a
k8s.io/gengo/testdata/a/b

What did you see instead?

see above

While it is a wanted behavior, that testdata is excluded from wildcard lists, i't seems rather counter-intuitive, that wildcard expansion inside testdata does not work.

@andybons
Copy link
Member

@bcmills @matloob @jayconrod

@andybons andybons added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 16, 2020
@andybons andybons added this to the Unplanned milestone Apr 16, 2020
@andybons andybons added the GoCommand cmd/go label Apr 16, 2020
@bcmills
Copy link
Contributor

bcmills commented Apr 16, 2020

Per go help packages:

Directory and file names that begin with "." or "_" are ignored by the go tool, as are directories named "testdata".

Note that the documentation refers to directories, not suffixes or subdirectories.

Could you explain more about the use-case here? (Why do you need to list testdata packages using a wildcard?)

@bcmills bcmills added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Apr 16, 2020
@tbe
Copy link
Author

tbe commented Apr 17, 2020 via email

@joedian joedian removed the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GoCommand cmd/go NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants