-
Notifications
You must be signed in to change notification settings - Fork 570
Go version check is not portable #1018
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
Comments
Thanks for the report. Unfortunately, I don't have access to Gentoo to investigate a solution myself, but as a workaround you can create a VERSION file with |
I think that this might be better, just assume that they installed GopherJS using the same version of Go as the one they are trying to run:
|
I wonder if this solution would break GOPHERJS_GOROOT usage. Maybe a safer solution would be to provide some sort of command-line flag to ignore the version check? |
Yeah, because we now explicitly support building GopherJS tool with a different Go version than the one to be used by GopherJS build itself, this isn't a very safe fallback. So in my private fork I have this change, which allows to bypass the check by setting an environment variable. This is convenient for GopherJS development, but I think this is not very good for users, who'd have to set yet another variable even if they didn't do anything wrong per se (using your distribution's Go version should be supported). Probably the safest option would be to to execute |
As of Go 1.21, the VERSION file has additional metadata after the first line. Use only the text on the first line when reporting the Go version. For #1018.
Running Gentoo, the following version check fails:
GopherJS 1.16.0+go1.16.3 requires a Go 1.16.x distribution, but failed to read its VERSION file: open /usr/lib/go/VERSION: no such file or directory
at compiler/version_check.go:22
The gentoo install doesn't create a VERSION file.
The text was updated successfully, but these errors were encountered: