Previously, gomobile bind's go.mod generation logic assumed replacing module was always located in the disk, but is not always true. It's valid to replace a module(version) with another module&version. For example, replace golang.org/x/tools => ../ causes: { "Path": "golang.org/x/tools", "Version": "v0.0.0-20191017151554-a3bc800455d5", "Replace": { "Path": "../", "Dir": "/usr/local/google/home/hakim/go/src/golang.org/x/tools", "GoMod": "/usr/local/google/home/hakim/go/src/golang.org/x/tools/go.mod", "GoVersion": "1.11" }, "Dir": "/usr/local/google/home/hakim/go/src/golang.org/x/tools", "GoMod": "/usr/local/google/home/hakim/go/src/golang.org/x/tools/go.mod", "GoVersion": "1.11" } replace github.com/anacrolix/torrent v1.13.0 => gitlab.com/axet/torrent v0.0.0-20200205141541-92b4b9e7387e causes: { "Path": "github.com/anacrolix/torrent", "Version": "v1.13.0", "Replace": { "Path": "gitlab.com/axet/torrent", "Version": "v0.0.0-20200205141541-92b4b9e7387e", "Time": "2020-02-05T14:15:41Z", "Dir": "/usr/local/google/home/hakim/go/pkg/mod/gitlab.com/axet/torrent@v0.0.0-20200205141541-92b4b9e7387e", "GoMod": "/usr/local/google/home/hakim/go/pkg/mod/cache/download/gitlab.com/axet/torrent/@v/v0.0.0-20200205141541-92b4b9e7387e.mod" }, "Dir": "/usr/local/google/home/hakim/go/pkg/mod/gitlab.com/axet/torrent@v0.0.0-20200205141541-92b4b9e7387e", "GoMod": "/usr/local/google/home/hakim/go/pkg/mod/cache/download/gitlab.com/axet/torrent/@v/v0.0.0-20200205141541-92b4b9e7387e.mod" } Also, while we are here, trim down the entries added to the generated go.mod. We need the main module, and the replaced module info. We may want to pin golang.org/x/mobile version if possible, but I don't know a reliable way to achieve that yet. Fixes golang/go#37048 Change-Id: Ibd7332338c0a3c4165a642c3e86852061f6ab13b Reviewed-on: https://go-review.googlesource.com/c/mobile/+/218057 Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Go support for Mobile devices
The Go mobile repository holds packages and build tools for using Go on mobile platforms.
Package documentation as a starting point:
The Go Mobile project is experimental. Use this at your own risk. While we are working hard to improve it, neither Google nor the Go team can provide end-user support.
This is early work and installing the build system requires Go 1.5. Follow the instructions on golang.org/wiki/Mobile to install the gomobile command, build the basic and the bind example apps.
--
Contributions to Go are appreciated. See https://golang.org/doc/contribute.html.
- Bugs can be filed at the Go issue tracker.
- Feature requests should preliminary be discussed on golang-nuts mailing list.
Description
Languages
Go
86.9%
Objective-C
4.7%
Java
4.6%
C
3.4%
HTML
0.3%
Other
0.1%