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

"could not load export data: no export data" in test-only packages #657

Closed
bconway opened this issue Nov 15, 2019 · 2 comments
Closed

"could not load export data: no export data" in test-only packages #657

bconway opened this issue Nov 15, 2019 · 2 comments
Labels

Comments

@bconway
Copy link

bconway commented Nov 15, 2019

Summary:

I have some packages that contain only *_test.go files. When run with the release.2019.2 there are no issues:

$ staticcheck -checks all,-ST1000 -unused.whole-program ./...
$

Shortly after 2019.2 was branched, I noticed the following on master:

$ staticcheck -checks all,-ST1000 -unused.whole-program ./...
-: could not load export data: no export data for "github.com/x/y/z/app1/test" (compile)
-: could not load export data: no export data for "github.com/x/y/z/app2/test" (compile)
-: could not load export data: no export data for "github.com/x/y/z/app3/test" (compile)
$ echo ${?}
1
$

Please make sure to include the following information in your issue report:

  • The output of 'staticcheck -version'
staticcheck (no version)
  • The output of 'staticcheck -debug.version' (it is fine if this command fails)
staticcheck (no version)

Compiled with Go version: go1.13.4
Built without Go modules
  • The output of 'go version'
go version go1.13.4 darwin/amd64
  • The output of 'go env'
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/bconway/Library/Caches/go-build"
GOENV="/Users/bconway/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/bconway/.go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/Users/bconway/homebrew/Cellar/go/1.13.4/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/bconway/homebrew/Cellar/go/1.13.4/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/bconway/code/go/x/y/go.mod"
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/dg/vgb4f3j95md47ltbzf2s5z_80000gp/T/go-build226170866=/tmp/go-build -gno-record-gcc-switches -fno-common"
  • Exactly which command you ran
    See above.

  • Output of the command and what's wrong with the output
    See above.

  • Where we can read the code you're running staticcheck on
    Currently private, but I'm optimistic this is trivial to reproduce.

@bconway bconway added bug needs-triage Newly filed issue that needs triage labels Nov 15, 2019
@dominikh
Copy link
Owner

Thanks for filing the issue. This is the same as #646.

@bconway
Copy link
Author

bconway commented Nov 16, 2019 via email

@dominikh dominikh removed the needs-triage Newly filed issue that needs triage label Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants