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: "could not load export data" regression running staticcheck #34588

Closed
kevinburke1 opened this issue Sep 28, 2019 · 5 comments
Closed

Comments

@kevinburke1
Copy link

kevinburke1 commented Sep 28, 2019

Steps to reproduce:

  • on a Macbook Pro running latest OS, compile Go at version 95b8cbf
  • run go install golang.org/x/tools/... with latest x/tools version
  • run go install honnef.co/go/tools/... with either the latest tagged staticcheck release or the latest commit on master.
  • run staticcheck ./... on any codebase, for example github.com/kevinburke/go-bindata

I expect it to report the usual set of linter errors (or none, if the linter reports no errors). Instead I get output that looks like this:

-: could not analyze dependency crypto/rand of github.com/kevinburke/go-bindata [github.com/kevinburke/go-bindata.test]:
	could not analyze dependency errors of crypto/rand:
	could not analyze dependency internal/reflectlite of errors:
	could not analyze dependency runtime of internal/reflectlite:
	could not analyze dependency runtime/internal/math of runtime:
	could not analyze dependency runtime/internal/sys of runtime/internal/math:
	could not load export data: cannot import "runtime/internal/sys" (unknown iexport format version 1), export data is newer version - update tool (compile)

I cannot reproduce with the previous commit in the Go tree (683ef8c).

I am trying to run Go tip as my primary development environment but this is the second workflow-breaking issue I have run into in two weeks (previously #34294). I am willing to accept occasional workflow disturbances but two in two weeks that require 30-60 minutes to track down is too many.

If a change in the export data requires these tools to be updated, maybe the new versions can be released in parallel.

@kevinburke1
Copy link
Author

I just ran trybots on tip for both the Go project and x/tools and both passed.

@josharian
Copy link
Contributor

Dup of #34564?

@kevinburke1
Copy link
Author

I don't think so... that issue seems to be that it is tedious to update the logic in two places, but the author seems to think that the listed patches fixed things.

I am compiling go and x/tools with both of the listed commits included - the newest versions of each - and getting the error message above.

@mdempsky
Copy link
Member

Tools need to be built against a current version of x/tools to process object files built by current cmd/compile.

@kevinburke1
Copy link
Author

I could have sworn I was running staticcheck with an updated go/tools, but I guess not. Seems to work if I compile it in. Whoops.

@golang golang locked and limited conversation to collaborators Sep 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants