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
kevinburkemeter opened this issue Sep 28, 2019 · 5 comments
Closed

cmd/go: "could not load export data" regression running staticcheck #34588

kevinburkemeter opened this issue Sep 28, 2019 · 5 comments

Comments

@kevinburkemeter
Copy link

@kevinburkemeter kevinburkemeter 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.

@kevinburkemeter

This comment has been minimized.

Copy link
Author

@kevinburkemeter kevinburkemeter commented Sep 28, 2019

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

@josharian

This comment has been minimized.

Copy link
Contributor

@josharian josharian commented Sep 28, 2019

Dup of #34564?

@kevinburkemeter

This comment has been minimized.

Copy link
Author

@kevinburkemeter kevinburkemeter commented Sep 28, 2019

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

This comment has been minimized.

Copy link
Member

@mdempsky mdempsky commented Sep 29, 2019

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

@kevinburkemeter

This comment has been minimized.

Copy link
Author

@kevinburkemeter kevinburkemeter commented Sep 29, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.