Skip to content

Commit 163aa33

Browse files
committed
Prepare a new 1.18.0-beta2+go1.18.5 release.
I tried to bump the tested Go version to 1.18.9, but it isn't available in Chocolatey and causes Windows CI to fail. I ran the tests locally though and there doesn't seem to be any incompatibility.
1 parent 6b4bcd1 commit 163aa33

File tree

2 files changed

+25
-19
lines changed

2 files changed

+25
-19
lines changed

README.md

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
GopherJS - A compiler from Go to JavaScript
2-
-------------------------------------------
1+
## GopherJS - A compiler from Go to JavaScript
32

43
[![GoDoc](https://godoc.org/github.com/gopherjs/gopherjs/js?status.svg)](https://godoc.org/github.com/gopherjs/gopherjs/js)
54
[![Sourcegraph](https://sourcegraph.com/github.com/gopherjs/gopherjs/-/badge.svg)](https://sourcegraph.com/github.com/gopherjs/gopherjs?badge)
@@ -9,18 +8,18 @@ GopherJS compiles Go code ([go.dev](https://go.dev/)) to pure JavaScript code. I
98

109
### Help us make GopherJS better!
1110

12-
- ⤴️ **Help us make better decisions by filling a quick 15-question [GopherJS user survey](https://forms.gle/WEjZqZaPxTxjD9YP8)**.
13-
- 📢 Report and discuss [issues](https://github.com/gopherjs/gopherjs/issues).
14-
- 🎓 Share your knowledge and experience through [articles](https://github.com/gopherjs/gopherjs/wiki/Community-Tutorials-and-Blogs) and [documentation](https://github.com/gopherjs/gopherjs/tree/master/doc).
15-
- 🛠️ Write GopherJS [bindings](https://github.com/gopherjs/gopherjs/wiki/Bindings) for other libraries or [contribute](https://github.com/gopherjs/gopherjs/wiki/Developer-Guidelines) to GopherJS itself.
11+
- ⤴️ **Help us make better decisions by filling a quick 15-question [GopherJS user survey](https://forms.gle/WEjZqZaPxTxjD9YP8)**.
12+
- 📢 Report and discuss [issues](https://github.com/gopherjs/gopherjs/issues).
13+
- 🎓 Share your knowledge and experience through [articles](https://github.com/gopherjs/gopherjs/wiki/Community-Tutorials-and-Blogs) and [documentation](https://github.com/gopherjs/gopherjs/tree/master/doc).
14+
- 🛠️ Write GopherJS [bindings](https://github.com/gopherjs/gopherjs/wiki/Bindings) for other libraries or [contribute](https://github.com/gopherjs/gopherjs/wiki/Developer-Guidelines) to GopherJS itself.
1615

1716
### What's new?
1817

19-
- 2022-08-18: Go 1.18 support is [available](https://github.com/gopherjs/gopherjs/releases/tag/v1.18.0-beta1%2Bgo1.18.5)!
20-
- 2021-09-19: Go 1.17 support is available!
21-
- 2021-08-23: Go Modules are now fully supported.
22-
- 2021-06-19: Complete `syscall/js` package implementation compatible with the upstream Go 1.16.
23-
- 2021-04-04: **Go 1.16 is now officially supported!** 🎉 🎉 🎉
18+
- 2022-08-18: Go 1.18 support is [available](https://github.com/gopherjs/gopherjs/releases/tag/v1.18.0-beta2%2Bgo1.18.5)!
19+
- 2021-09-19: Go 1.17 support is available!
20+
- 2021-08-23: Go Modules are now fully supported.
21+
- 2021-06-19: Complete `syscall/js` package implementation compatible with the upstream Go 1.16.
22+
- 2021-04-04: **Go 1.16 is now officially supported!** 🎉 🎉 🎉
2423

2524
### Playground
2625

@@ -38,7 +37,7 @@ version, you can use an [older GopherJS release](https://github.com/gopherjs/gop
3837
Install GopherJS with `go install`:
3938

4039
```
41-
go install github.com/gopherjs/gopherjs@v1.18.0-beta1 # Or replace 'v1.18.0-beta1' with another version.
40+
go install github.com/gopherjs/gopherjs@v1.18.0-beta2 # Or replace 'v1.18.0-beta2' with another version.
4241
```
4342

4443
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:
@@ -53,7 +52,7 @@ Now you can use `gopherjs build [package]`, `gopherjs build [files]` or `gopherj
5352

5453
`gopherjs` uses your platform's default `GOOS` value when generating code. Supported `GOOS` values are: `linux`, `darwin`. If you're on a different platform (e.g., Windows or FreeBSD), you'll need to set the `GOOS` environment variable to a supported value. For example, `GOOS=linux gopherjs build [package]`.
5554

56-
*Note: GopherJS will try to write compiled object files of the core packages to your $GOROOT/pkg directory. If that fails, it will fall back to $GOPATH/pkg.*
55+
_Note: GopherJS will try to write compiled object files of the core packages to your $GOROOT/pkg directory. If that fails, it will fall back to $GOPATH/pkg._
5756

5857
#### gopherjs run, gopherjs test
5958

@@ -79,11 +78,11 @@ If you include an argument, it will be the root from which everything is served.
7978

8079
There are some GopherJS-specific environment variables:
8180

82-
- `GOPHERJS_GOROOT` - if set, GopherJS uses this value as the default GOROOT
83-
value, instead of using the system GOROOT as the default GOROOT value
84-
- `GOPHERJS_SKIP_VERSION_CHECK` - if set to true, GopherJS will not check
85-
Go version in the GOROOT for compatibility with the GopherJS release. This
86-
is primarily useful for testing GopherJS against unreleased versions of Go.
81+
- `GOPHERJS_GOROOT` - if set, GopherJS uses this value as the default GOROOT
82+
value, instead of using the system GOROOT as the default GOROOT value
83+
- `GOPHERJS_SKIP_VERSION_CHECK` - if set to true, GopherJS will not check
84+
Go version in the GOROOT for compatibility with the GopherJS release. This
85+
is primarily useful for testing GopherJS against unreleased versions of Go.
8786

8887
### Performance Tips
8988

@@ -93,14 +92,17 @@ There are some GopherJS-specific environment variables:
9392
- Use `float64` instead of `float32`.
9493

9594
### Community
95+
9696
- [#gopherjs Channel on Gophers Slack](https://gophers.slack.com/messages/gopherjs/) (invites to Gophers Slack are available [here](http://blog.gopheracademy.com/gophers-slack-community/#how-can-i-be-invited-to-join:2facdc921b2310f18cb851c36fa92369))
9797
- [Bindings to JavaScript APIs and libraries](https://github.com/gopherjs/gopherjs/wiki/bindings)
9898
- [GopherJS Blog](https://medium.com/gopherjs)
9999
- [GopherJS on Twitter](https://twitter.com/GopherJS)
100100
- [Examples, tutorials and blogs](https://github.com/gopherjs/gopherjs/wiki/Community-Tutorials-and-Blogs)
101+
101102
### Getting started
102103

103104
#### Interacting with the DOM
105+
104106
The package `github.com/gopherjs/gopherjs/js` (see [documentation](https://godoc.org/github.com/gopherjs/gopherjs/js)) provides functions for interacting with native JavaScript APIs. For example the line
105107

106108
```js
@@ -116,6 +118,7 @@ js.Global.Get("document").Call("write", "Hello world!")
116118
You may also want use the [DOM bindings](http://dominik.honnef.co/go/js/dom), the [jQuery bindings](https://github.com/gopherjs/jquery) (see [TodoMVC Example](https://github.com/gopherjs/todomvc)) or the [AngularJS bindings](https://github.com/wvell/go-angularjs). Those are some of the [bindings to JavaScript APIs and libraries](https://github.com/gopherjs/gopherjs/wiki/bindings) by community members.
117119

118120
#### Providing library functions for use in other JavaScript code
121+
119122
Set a global variable to a map that contains the functions:
120123

121124
```go
@@ -151,6 +154,7 @@ For more details see [Jason Stone's blog post](http://legacytotheedge.blogspot.d
151154
### Architecture
152155

153156
#### General
157+
154158
GopherJS emulates a 32-bit environment. This means that `int`, `uint` and `uintptr` have a precision of 32 bits. However, the explicit 64-bit integer types `int64` and `uint64` are supported. The `GOARCH` value of GopherJS is "js". You may use it as a build constraint: `// +build js,-wasm`.
155159

156160
#### Application Lifecycle
@@ -160,6 +164,7 @@ The `main` function is executed as usual after all `init` functions have run. Ja
160164
In the browser, calling `os.Exit` (e.g. indirectly by `log.Fatal`) also does not terminate the execution of the program. For convenience, it calls `runtime.Goexit` to immediately terminate the calling goroutine.
161165

162166
#### Goroutines
167+
163168
Goroutines are fully supported by GopherJS. The only restriction is that you need to start a new goroutine if you want to use blocking code called from external JavaScript:
164169

165170
```go
@@ -179,4 +184,5 @@ JavaScript has no concept of concurrency (except web workers, but those are too
179184
GopherJS does some heavy lifting to work around this restriction: Whenever an instruction is blocking (e.g. communicating with a channel that isn't ready), the whole stack will unwind (= all functions return) and the goroutine will be put to sleep. Then another goroutine which is ready to resume gets picked and its stack with all local variables will be restored.
180185

181186
### GopherJS Development
187+
182188
If you're looking to make changes to the GopherJS compiler, see [Developer Guidelines](https://github.com/gopherjs/gopherjs/wiki/Developer-Guidelines) for additional developer information.

compiler/version_check.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
)
1414

1515
// Version is the GopherJS compiler version string.
16-
const Version = "1.18.0+go1.18.5"
16+
const Version = "1.18.0-beta2+go1.18.5"
1717

1818
// GoVersion is the current Go 1.x version that GopherJS is compatible with.
1919
const GoVersion = 18

0 commit comments

Comments
 (0)