cmd/ebitenmobile: Bug fix: Record go.sum correctly to build gomobile/gobind

Closes #1487
This commit is contained in:
Hajime Hoshi 2021-02-10 02:03:06 +09:00
parent ec843ce92c
commit ba674a686c
3 changed files with 8 additions and 4 deletions

View File

@ -103,7 +103,11 @@ func prepareGomobileCommands() error {
if err := runGo("mod", "init", "ebitenmobiletemporary"); err != nil {
return err
}
if err := runGo("get", "golang.org/x/mobile@"+gomobileHash); err != nil {
// To record gomobile to go.sum for Go 1.16 and later, go-get gomobile instaed of golang.org/x/mobile (#1487).
// This also records gobind as gomobile depends on gobind indirectly.
// Note that `go mod tidy` doesn't work since this removes all the indirect imports.
if err := runGo("get", "golang.org/x/mobile/cmd/gomobile@"+gomobileHash); err != nil {
return err
}
if localgm := os.Getenv("EBITENMOBILE_GOMOBILE"); localgm != "" {

2
go.mod
View File

@ -13,7 +13,7 @@ require (
github.com/jfreymuth/oggvorbis v1.0.3
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
golang.org/x/image v0.0.0-20200927104501-e162460cd6b5
golang.org/x/mobile v0.0.0-20200801112145-973feb4309de
golang.org/x/mobile v0.0.0-20210208171126-f462b3930c8f
golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634
golang.org/x/tools v0.0.0-20201009162240-fcf82128ed91
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect

4
go.sum
View File

@ -40,8 +40,8 @@ golang.org/x/image v0.0.0-20200927104501-e162460cd6b5 h1:QelT11PB4FXiDEXucrfNckH
golang.org/x/image v0.0.0-20200927104501-e162460cd6b5/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190415191353-3e0bab5405d6/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
golang.org/x/mobile v0.0.0-20200801112145-973feb4309de h1:OVJ6QQUBAesB8CZijKDSsXX7xYVtUhrkY0gwMfbi4p4=
golang.org/x/mobile v0.0.0-20200801112145-973feb4309de/go.mod h1:skQtrUTUwhdJvXM/2KKJzY8pDgNr9I/FOMqDVRPBUS4=
golang.org/x/mobile v0.0.0-20210208171126-f462b3930c8f h1:aEcjdTsycgPqO/caTgnxfR9xwWOltP/21vtJyFztEy0=
golang.org/x/mobile v0.0.0-20210208171126-f462b3930c8f/go.mod h1:skQtrUTUwhdJvXM/2KKJzY8pDgNr9I/FOMqDVRPBUS4=
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.1.1-0.20191209134235-331c550502dd/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=