From f984f5ada9a6bc9a06d941654a7e6c396b54b496 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Wed, 1 May 2019 17:43:28 +0900 Subject: [PATCH] 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. --- go.mod | 2 ++ goversion.go | 9 +++++---- run.go | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index b5ebd1f6b..cc3ab481a 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/goversion.go b/goversion.go index a25f7565f..edffd6472 100644 --- a/goversion.go +++ b/goversion.go @@ -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 diff --git a/run.go b/run.go index 75b29312f..54fc43206 100644 --- a/run.go +++ b/run.go @@ -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