Skip to content

Detect when gopherjs binary Go version != GOROOT version, exit with helpful error. #671

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

Closed
dmitshur opened this issue Aug 4, 2017 · 2 comments

Comments

@dmitshur
Copy link
Member

dmitshur commented Aug 4, 2017

It's possible to do the following set of steps:

  1. Use version Go 1.N.
  2. go get -u github.com/gopherjs/gopherjs.
  3. Update Go to version 1.N+1. (Or downgrade to 1.N-1, or use any other version of Go.)
  4. Run gopherjs.

At step 4, you'll run into problems because the gopherjs binary was built for one version of Go, but you have a different version installed.

We have a compile-time check for version mismatch, but not a runtime one. We should add one, to make the error message more helpful, instead of something unexpected like:

../../../../../../../../usr/local/go/src/runtime/error.go:134:3: undeclared name: throw
../../../../../../../../usr/local/go/src/runtime/error.go:136:12: undeclared name: CallersFrames
../../../../../../../../usr/local/go/src/runtime/error.go:144:3: undeclared name: throw
../../../../../../../../usr/local/go/src/runtime/error.go:148:3: undeclared name: throw
../../../../../../../../usr/local/go/src/runtime/error.go:153:3: undeclared name: throw
../../../../../../../../usr/local/go/src/runtime/error.go:156:3: undeclared name: throw

This idea is inspired by #670.

@flimzy
Copy link
Member

flimzy commented Apr 9, 2021

@dmitshur If I'm not mistaken, this has been fixed for ages, no? Can this issue be closed?

@dmitshur
Copy link
Member Author

dmitshur commented Apr 9, 2021

Yes, this ended up being a subset of #941 and got implemented in #966 in Feb 2020.

@dmitshur dmitshur closed this as completed Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants