Skip to content

Commit 98cf52b

Browse files
flimzynevkontakte
authored andcommitted
Update 1.17 to 1.18
1 parent 1497816 commit 98cf52b

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

.github/workflows/measure-size.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
fetch-depth: 0
1212
- uses: actions/setup-go@v2
1313
with:
14-
go-version: '~1.17.9'
14+
go-version: '~1.18.1'
1515
- uses: gopherjs/output-size-action/measure@main
1616
with:
1717
name: jQuery TodoMVC

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ GopherJS compiles Go code ([golang.org](https://golang.org/)) to pure JavaScript
1616

1717
### What's new?
1818

19+
- 2022-XX-XX: Go 1.18 support is available
1920
- 2021-09-19: Go 1.17 support is available!
2021
- 2021-08-23: Go Modules are now fully supported.
2122
- 2021-06-19: Complete `syscall/js` package implementation compatible with the upstream Go 1.16.
@@ -31,7 +32,7 @@ Nearly everything, including Goroutines ([compatibility documentation](https://g
3132

3233
### Installation and Usage
3334

34-
GopherJS [requires Go 1.17 or newer](https://github.com/gopherjs/gopherjs/blob/master/doc/compatibility.md#go-version-compatibility). If you need an older Go
35+
GopherJS [requires Go 1.18 or newer](https://github.com/gopherjs/gopherjs/blob/master/doc/compatibility.md#go-version-compatibility). If you need an older Go
3536
version, you can use an [older Gopher release](https://github.com/gopherjs/gopherjs/releases).
3637

3738
Get or update GopherJS and dependencies with:
@@ -40,12 +41,12 @@ Get or update GopherJS and dependencies with:
4041
go get -u github.com/gopherjs/gopherjs
4142
```
4243

43-
If your local Go distribution as reported by `go version` is newer than Go 1.17, then you need to set the `GOPHERJS_GOROOT` environment variable to a directory that contains a Go 1.17 distribution. For example:
44+
If your local Go distribution as reported by `go version` is newer than Go 1.18, then you need to set the `GOPHERJS_GOROOT` environment variable to a directory that contains a Go 1.18 distribution. For example:
4445

4546
```
46-
go get golang.org/dl/go1.17.1
47-
go1.17.1 download
48-
export GOPHERJS_GOROOT="$(go1.17.1 env GOROOT)" # Also add this line to your .profile or equivalent.
47+
go get golang.org/dl/go1.18.1
48+
go1.18.1 download
49+
export GOPHERJS_GOROOT="$(go1.18.1 env GOROOT)" # Also add this line to your .profile or equivalent.
4950
```
5051

5152
Now you can use `gopherjs build [package]`, `gopherjs build [files]` or `gopherjs install [package]` which behave similar to the `go` tool. For `main` packages, these commands create a `.js` file and `.js.map` source map in the current directory or in `$GOPATH/bin`. The generated JavaScript file can be used as usual in a website. Use `gopherjs help [command]` to get a list of possible command line flags, e.g. for minification and automatically watching for changes.

circle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ workflows:
5454
parameters:
5555
go_version:
5656
type: string
57-
default: "1.17.9"
57+
default: "1.18.1"
5858
nvm_version:
5959
type: string
6060
default: "0.38.0"

compiler/version_check.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
//go:build go1.17
2-
// +build go1.17
1+
//go:build go1.18
2+
// +build go1.18
33

44
package compiler
55

@@ -13,10 +13,10 @@ import (
1313
)
1414

1515
// Version is the GopherJS compiler version string.
16-
const Version = "1.17.2+go1.17.9"
16+
const Version = "1.18.0+go1.18.1"
1717

1818
// GoVersion is the current Go 1.x version that GopherJS is compatible with.
19-
const GoVersion = 17
19+
const GoVersion = 18
2020

2121
// CheckGoVersion checks the version of the Go distribution
2222
// at goroot, and reports an error if it's not compatible
@@ -50,7 +50,7 @@ func goRootVersion(goroot string) (string, error) {
5050
if err != nil {
5151
return "", fmt.Errorf("`go version` command failed: %w", err)
5252
}
53-
// Expected output: go version go1.17.1 linux/amd64
53+
// Expected output: go version go1.18.1 linux/amd64
5454
parts := strings.Split(string(out), " ")
5555
if len(parts) != 4 {
5656
return "", fmt.Errorf("unexpected `go version` output %q, expected 4 words", string(out))

0 commit comments

Comments
 (0)