Commit Graph

10 Commits

Author SHA1 Message Date
Hana (Hyang-Ah) Kim 122ae57121 go.mod: update golang.org/x/tools@316ba0b
We plan to move example/ivy to a separate module by adding go.mod
in the directory. That change will break gobind tests that depend
on golang.org/x/tools/packages/packagestest which didn't handle
nested module directories. Update the dependency to pick up the fix
(https://go-review.googlesource.com/c/tools/+/358037)

Change-Id: Ie333093a7f48e50623738ff7c18748161ce62175
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/357617
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Reviewed-by: Peter Weinberger <pjw@google.com>
2021-10-27 13:47:05 +00:00
Jay Conrod 7e972142eb all: update golang.org/x/tools to v0.1.2
This should fix an incompatibility between
golang.org/x/tools/go/packages/packagestest and Go 1.17.

Fixes golang/go#46418

Change-Id: If1416f53685632d705e7814354f792eb30de88a2
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/323149
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
2021-05-27 17:15:05 +00:00
Hajime Hoshi e4a08af010 cmd/gomobile: create go.sum at the temporary directory
As of Go1.16, `go build` fails if go.sum does not exist. This change
fixes this issue by forcing to create go.sum by calling `go mod tidy`.

Closes golang/go#44162

Change-Id: Ibba738503d1a58c6533b2427dd4efa6954b8eaa3
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/290409
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
Trust: Than McIntosh <thanm@google.com>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2021-02-08 16:36:35 +00:00
Hajime Hoshi 23a0503ab4 cmd/gomobile: enable Cgo
This CL gives CGO_ENABLED=1 explicitly when executing gobind since
Cgo is disabled by default when GOOS is given.

This CL also adds importing C to the tests to confirm that Cgo
works correctly.

This CL also updates go.mod since this change requries the change
in go/packages: golang.org/cl/214943

Updates golang/go#27234
Updates golang/go#36547

Change-Id: I66f9697f992f15b52fca7871e4e0ed64ca2b4965
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/214498
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2020-01-23 02:49:29 +00:00
Hajime Hoshi 1d13e329d2 cmd/gomobile: enable Go modules in gomobile-bind
This CL enables Go modules in gomobile-bind command. This CL
generates go.mod at $WORK/src based on the modules state of the
working directory, and use it when executing go-build.

Updates golang/go#27234

Change-Id: I6958f29a317c0d2fb9ffa373f6e3c4cabdc4e898
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/210380
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2020-01-13 15:31:55 +00:00
Hajime Hoshi b558ed8633 all: update go.mod
The latest x/tools includes the fix
https://go-review.googlesource.com/c/tools/+/192330 for
golang/go#33937.

Updates golang/go#33937

Change-Id: I4af068315fb16aa3d526214f89e4005d792d0c49
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/194497
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2019-09-10 18:44:05 +00:00
Hajime Hoshi cafc553e1a cmd/gobind: fix build-tag, CGO and load trybot failures
* Correctly format build tags to pass into go/packages
* Removes CGO_ENABLED=0 from a packages.Load configuration
* Calls go/packages.Load twice to work around a build cache
* staleness issue

These bugs were introduced by CL 189597.

Updates golang/go#27234.
Updates golang/go#33687.

Change-Id: I3ae6737bf53bbecda0c7e25885b9c6aea5779332
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/190479
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
2019-08-26 17:01:11 +00:00
Hajime Hoshi e8b3e6111d internal/importers: replace go/build usages with go/packages
This CL is a pure refactoring to replace go/build usage with
golang.org/x/tools/go/packages. This is a preparation for Go
modules.

Updates golang/go#27234

Change-Id: I3e6a30b962da1a64bc43a89a7f02c03d559f86d3
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/189597
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2019-08-14 14:30:26 +00:00
Hajime Hoshi 597adff16a x/mobile: update dependencies
Change-Id: I830b0afbd9ac67a24302e56b3109a8b822e16b46
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/188837
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2019-08-06 16:23:12 +00:00
Bryan C. Mills a4d62f3683 all: add go.mod
Commands run:
	go mod init
	go mod edit -go=1.11
	go mod tidy
	go list -m all
	go test ./...

Updates golang/go#30228
Updates golang/go#27234

Change-Id: Ibf3b104bfaa037e1a94a5327b5a56983d9744e73
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/167180
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-03-13 03:55:08 +00:00