Force to use Go 1.12 or later

As syscall/js has incompatible change between Go 1.11 and Go 1.12,
it is safe to force to use Go 1.12.
This commit is contained in:
Hajime Hoshi 2019-05-01 17:43:28 +09:00
parent 1b7be0055a
commit f984f5ada9
3 changed files with 8 additions and 5 deletions

2
go.mod
View File

@ -1,5 +1,7 @@
module github.com/hajimehoshi/ebiten
go 1.12
require (
github.com/go-gl/glfw v0.0.0-20181213070059-819e8ce5125f
github.com/gofrs/flock v0.7.0

View File

@ -12,11 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// +build go1.11
// +build go1.12
package ebiten
// Between Go 1.10 and Go 1.11, ioutil.TempFile's behavior is different.
// Ebiten forces the Go version in order to avoid confusion. (#777)
// Ebiten forces to use Go 1.12 or later, since
// 1) Between Go 1.10 and Go 1.11, ioutil.TempFile's behavior is different. Ebiten forces the Go version in order to avoid confusion. (#777)
// 2) FuncOf in syscall/js is defined as of Go 1.12.
const __EBITEN_REQUIRES_GO_VERSION_1_11_OR_LATER__ = true
const __EBITEN_REQUIRES_GO_VERSION_1_12_OR_LATER__ = true

2
run.go
View File

@ -23,7 +23,7 @@ import (
"github.com/hajimehoshi/ebiten/internal/web"
)
var _ = __EBITEN_REQUIRES_GO_VERSION_1_11_OR_LATER__
var _ = __EBITEN_REQUIRES_GO_VERSION_1_12_OR_LATER__
// TPS represents a default ticks per second, that represents how many times game updating happens in a second.
const DefaultTPS = 60