Skip to content

runtime: Version() returns Go version provided by the compiler. #1065

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

Merged
merged 3 commits into from
Sep 18, 2021

Conversation

nevkontakte
Copy link
Member

@nevkontakte nevkontakte commented Sep 18, 2021

This change improves Go version detection for the provided GOROOT by
falling back to go version command output if VERSION file doesn't
exist (fixes #1018).

If GOROOT-based version detection failed, it falls back further to
the Go version from GopherJS release or a minor version in "go1.x"
format.

The detected value is then injected by the compiler into the generated
JS file and picked up by the runtime package.

This PR also brings the Go version we test against up to date (1.17.1).

This change improves Go version detection for the provided GOROOT by
falling back to `go version` command output if VERSION file doesn't
exist (fixes gopherjs#1018).

If GOROOT-based version detection failed, it falls back further to
the Go version from GopherJS release or a minor version in "go1.x"
format.

The detected value is then injected by the compiler into the generated
JS file and picked up by the `runtime` package.
@nevkontakte nevkontakte requested a review from flimzy September 18, 2021 13:02
@nevkontakte nevkontakte merged commit 41f8453 into gopherjs:wip-go1.17 Sep 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants