Skip to content

Commit

Permalink
cmd/ebitenmobile: Bug fix: Record go.sum correctly to build gomobile/…
Browse files Browse the repository at this point in the history
…gobind

Closes hajimehoshi#1487
  • Loading branch information
hajimehoshi committed Feb 9, 2021
1 parent 702fa8c commit 3fecdd6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion cmd/ebitenmobile/gomobile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 != "" {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/jfreymuth/oggvorbis v1.0.1
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
golang.org/x/image v0.0.0-20200801110659-972c09e46d76
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-20200918174421-af09f7315aff
golang.org/x/tools v0.0.0-20200918232735-d647fc253266
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ golang.org/x/image v0.0.0-20200801110659-972c09e46d76 h1:U7GPaoQyQmX+CBRWXKrvRzW
golang.org/x/image v0.0.0-20200801110659-972c09e46d76/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=
Expand Down

0 comments on commit 3fecdd6

Please sign in to comment.