Commit Graph

928 Commits

Author SHA1 Message Date
Elias Naur b392a2d072 bind: handle import paths without trailing slashes correctly
If ever the gobind tool switches to a source importer (see CL
99777), make sure import paths are without trailing slashes are
handled correctly.

Change-Id: Ib3ce15f8dcd53dce09a5bb183e4013a5deba39b4
Reviewed-on: https://go-review.googlesource.com/99776
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-21 12:14:32 +00:00
Elias Naur 2f2872eacd example/reverse: delete
The reverse bindings allow access to Java and ObjC APIs by importing
Java/... and Objc/... package from Go. The gobind tool automatically
create the bindings for the API referenced from the packages.

The reverse example takes that ability too far, however. It creates
a circular dependency from the Android databinding layout files to
exported Go types while those same Go types access the Java classes
generated by databinding. It works almost by accident, but not for
newer Gradle versions.

The circular dependencies are bad, but the underlying circular references
created by using the reverse bindings this way are worse. I haven't found
a satisfactory was to avoid retaining references to Go objects from Java
and back without carefully and manually breaking cycles at appropriate
times. One might succeed in ObjC where breaking reference cycles are
already necessary, but not in Java.

The reverse example is a nice technical feat, but promises more than
it can deliver. Delete it.

Fixes golang/go#19862
Fixes golang/go#18210

Change-Id: Ie6abd2a0ebd4c4ce36339d1294898e15f22f83bd
Reviewed-on: https://go-review.googlesource.com/101155
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-03-16 14:27:06 +00:00
Elias Naur 37c5126484 misc/androidstudio/src/main/groovy/org/golang/mobile: update gobind path
Gobind now outputs Java sources to the java/ subdirectory. Update the
gradle plugin to match. Only projects using reverse bindings are
affected.

Change-Id: Id7f893d3c67a9ab63336c4e031c9196a0b6dad2c
Reviewed-on: https://go-review.googlesource.com/99775
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-16 06:59:25 +00:00
Elias Naur 4600df55ca bind, cmd: generate complete standalone bindings from gobind
The gobind and gomobile bind tools have historically overlapped:
gobind outputs generated bindings, and gomobile bind will generate
bindings before building them. However, the gobind bindings were
never used for building and thus allowed to not be complete.

To simplify version control, debugging, instrumentation and build
system flexibility, this CL upgrades the gobind tool to be the
canonical binding generator and change gomobile bind to use gobind
instead of its own generator code.

This greatly simplifies gomobile bind, but also paves the way to skip
gomobile bind entirely. For example:

$ gobind -outdir=$GOPATH golang.org/x/mobile/example/bind/hello
$ GOOS=android GOARCH=arm64 CC=<ndk-toolchain>/bin/clang go build -buildmode=c-shared -o libgobind.so gobind
$ ls libgobind.*
libgobind.h  libgobind.so

The same applies to iOS, although the go build command line is more
involved.

By skipping gomobile it is possible to freely customize the Android
or iOS SDK level or any other flags not supported by gomobile bind.
By checking in the generated source code, the cost of supporting
gomobile in a custom build system is also decreased.

Change-Id: I59c14a77d625ac1377c23b3213672e0d83a48c85
Reviewed-on: https://go-review.googlesource.com/99316
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-16 06:47:34 +00:00
Elias Naur f16143114e bind, cmd/gobind/test: remove GOOS build tags from test packages
The gobind command is about to get more powerful and able to generate
complete and standalone bindings. Platform specific build tags based
on GOOS or GOARCH are now meaningless to generate bindings from, so
remove them from the test packages.

The tags mattered to the reverse bound packages, since the go tool can't
build them without the Go wrappers for the imported Java packages.
Before this CL, the `android` tag was used to fool the go tool since
the host GOOS is unlikely to be android.

A fix is to check in the generated Go wrappers, but since the
packages are for testing we don't want that. Instead, move the test
packages to the testdata directory so the go tool ignores them.

Change-Id: I57178e930a400f690ebd7a65758bed894eeb10b0
Reviewed-on: https://go-review.googlesource.com/99315
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-14 22:25:02 +00:00
Andrew Bonventre f9a23313dd CONTRIBUTING.md: remove note about not accepting Pull Requests
Updates golang/go#24185

Change-Id: I1ce066be52feff5d2372633776aa631e0ce7e713
Reviewed-on: https://go-review.googlesource.com/100684
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-03-14 18:02:45 +00:00
Elias Naur b7e3346cb3 cmd/gomobile: update gomobile bind -help text
The default ObjC prefix and Java package have been the empty string
for a while, but the gomobile bind -help text wasn't updated.

Change-Id: I8acb265ae7385121fae4c2cc314220d97575d20c
Reviewed-on: https://go-review.googlesource.com/99317
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-14 14:08:55 +00:00
Elias Naur bcd28df570 all: fix non-standard "DO NOT EDIT" comments for generated files
In the spirit of CL 99955, fix all non-standard generated code
headers and re-run the generators. Some generated files needed
git gofmt afterwards, but that problem is left for now.

Change-Id: I6b3131fb1753dc427d05af03107031120755cab0
Reviewed-on: https://go-review.googlesource.com/99975
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-14 14:08:28 +00:00
Elias Naur eac33190a3 cmd/gomobile: don't dump certificate to test log
The output takes up many lines and obscures other test output from
go test -v.

Change-Id: I0896717db3ce287f9e4b4263451475c19758b0e3
Reviewed-on: https://go-review.googlesource.com/99778
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-14 14:07:50 +00:00
Elias Naur 70bad68322 cmd/gomobile: remove redundant build
The extra build can't be required, because it is not run for the
build of the first GOARCH later in the loop. Tests run fine
without it.

Change-Id: Ida27e31ace2417192cce06c2efc93fa0d357012e
Reviewed-on: https://go-review.googlesource.com/98975
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-07 14:01:21 +00:00
Elias Naur 8a8a989f48 cmd/gomobile: run go install in c-shared mode only if NDK is set
A check for the NDK was missing from the pre-install of the standard
library for each Android GOARCH. If the NDK wasn't set, the go install
invocation would silently use the host GOARCH and GOOS and only fail if
no host gcc was found for runtime/cgo.

Discovered while setting up gomobile on a clean Windows machine.

With the go 1.10 cache go installing the standard library might be
pointless, but let's wait a little before removing it.

Change-Id: I880eed32aad23fda10ae92bd35be2ce9b03ddb86
Reviewed-on: https://go-review.googlesource.com/96636
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-02-23 15:52:32 +00:00
Elias Naur cdc07529f8 internal/binres: skip resources tests if android.jar of api 15 is missing
Change-Id: I1cf92bb03c420e1eddaa36824cf488c5ed6f5a78
Reviewed-on: https://go-review.googlesource.com/93998
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-02-21 20:21:33 +00:00
Elias Naur 4113bce085 bind/java: remove android support library dependency in test
Remove the android support library dependency.

The Android build system assumes at least one resource, so
add a dummy string.

Change-Id: I7223b75709f1aa5907e6d04bc656eea5503bb640
Reviewed-on: https://go-review.googlesource.com/94195
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-02-21 20:07:02 +00:00
Elias Naur 23253814e8 app: skip failing TestAndroidApp test
Updates golang/go#23835

Change-Id: If4aea8fde3b6b66980573d94f0d2189396f6a50c
Reviewed-on: https://go-review.googlesource.com/93997
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-02-21 20:06:47 +00:00
Hana Kim 78f32148b9 misc/androidstudio: update plugin version to 0.2.11
https://plugins.gradle.org/plugin/org.golang.mobile.bind/0.2.11

Built/published with

$ docker run --rm -u root -v "$PWD":/home/gradle/project \
     -w /home/gradle/project gradle:latest gradle publishPlugins

Gradle version 4.5.1

Change-Id: I431101a2b9000147430632ec24e76e8216c66935
Reviewed-on: https://go-review.googlesource.com/95455
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2018-02-20 15:45:06 +00:00
Vignesh Ramachandra f52077efd0 misc/androidstudio: ensure gomobile bind completes before java compilation
When there is no prior gradle cache (i.e .gradle/ directory isn't created yet) in your Android project and a gradle build command is executed (e.g ./gradlew build), the *.so files generated by the gobind android plugin is not packaged into the apk.
Successive builds work fine though.

This issue doesn't happen when using Android plugin version 2.x, but does using version 3.x.

The gomobile bind task, libTask, is only finalizing the java compile task which allows it to run in parallel with javaCompile. That is probably too late, so instead, make libTask a dependency of the compile task to make sure the output of gomobile bind (in particular, the *so libraries) are included in the final build product.

Fixes golang/go#23766

Change-Id: I62727bfa0ffd54d8158c3a2aa3d7303867fcbabc
Reviewed-on: https://go-review.googlesource.com/94835
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2018-02-20 15:10:30 +00:00
Elias Naur 4bfed40def all: fix vet errors from Go 1.10
Change-Id: I624bbbb5aeda923aa48c37af9447bc4903b0de3f
Reviewed-on: https://go-review.googlesource.com/93996
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-02-14 22:03:29 +00:00
Elias Naur 5704e182c7 bind: avoid header include cycles in generated ObjC code
The test in CL 87656 exposed the problem that an ObjC class C in
header C.h can't implement an interface I in I.h if I.h itself includes
C.h, resulting in an include cycle. Avoid the problem for now by
restricting the set of declared interfaces to the current package and
its imports. This is too strict, but simple and avoids any include
cycles.

Fixes the bind/objc SeqTest on iOS.

Change-Id: I2ff964593cb9e56994c42b68cc49eebe2f549217
Reviewed-on: https://go-review.googlesource.com/88818
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-01-22 17:02:51 +00:00
Ryuji Iwata 125c5259d9 cmd/gomobile: improve Xcode check
Since the xcrun binary exists in macOS from the beginning, it can not be used to check that Xcode is available.

The xcodebuild command does not return an error if Xcode is available.

Reference https://go-review.googlesource.com/c/mobile/+/35852

Change-Id: Ibb6324a2d801eab47b3544c50ee1cdbc36b608bc
Reviewed-on: https://go-review.googlesource.com/88755
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2018-01-20 19:27:59 +00:00
Egon Elbre 64951f83ad gl: fix typos in multiple places
Windows bindings had few invalid bindings.
Debug type had a typo, making gldebug non-compilable.
Use consistently .c() for types.

Fixes golang/go#23451

Change-Id: Ic9e68b1aafcd732dd5e4d8f883324723a35d24c3
Reviewed-on: https://go-review.googlesource.com/87855
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2018-01-17 09:46:58 +00:00
Elias Naur 0879aa9afa bind: support types with the same title name as their packages
If a Go struct or interface has the same name as its package class,
append an underscore to the generated Java class name.

Fixes golang/go#23327.

Change-Id: Ib680af35c956801073a0effb510a3ed9bbb8b9d1
Reviewed-on: https://go-review.googlesource.com/87656
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-01-17 09:45:22 +00:00
Thomas Meson 02851653b1 cmd/gobind: make it generate everything like gomobile bind
the promise of the doc is to be able, once run twice with objc/java and go, to
import the generated code into a package and build a c-archive for iOS and
a c-shared for Android. As of today, this promise is not kept. Imports were not
properly made, files were missing. Also, make it generates the output `gomobile
bind` does.

Change-Id: Ic28087fe1b1661d54f41c446233580856e3a1211
Reviewed-on: https://go-review.googlesource.com/87715
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2018-01-15 13:32:49 +00:00
Thomas Meson ace2f0b992 cmd/gobind: fix missing parameter for formatting
Change-Id: I89256a18a9aeb2f32808f391258c8f66690e5247
Reviewed-on: https://go-review.googlesource.com/87716
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2018-01-15 13:14:41 +00:00
Hana Kim 069be623eb example: update android examples to use 0.2.10 plugin
Also, modernize the build.gradle configurations
to work with recent Android plugin (>=3.0.0)

https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html

Update golang/go#21594

Change-Id: Ic2162db7367b60ad873149ab62767f36481fa80f
Reviewed-on: https://go-review.googlesource.com/86795
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2018-01-09 15:14:44 +00:00
Hana Kim 54bd6957e8 misc/androidstudio: update to 0.2.10
0.2.9 was broken - for unknown reasons, the plugin was built on
top of stale sources.

Updates golang/go#21594

Plugin 0.2.10 was built with rev 50b7067 and this change.
  % docker run --rm -u root -v "$PWD":/home/gradle/project \
    -w /home/gradle/project gradle:latest \
    gradle publishPlugins

Gradle version is 4.0.1.

Change-Id: I146dc67cbad3c9945a2acdf4ac7993283725090a
Reviewed-on: https://go-review.googlesource.com/86775
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2018-01-09 15:14:31 +00:00
Tad Fisher 50b7067763 bind/java: fix build on NDK r16
Import <string.h> to provide a memcpy declaration.

Fixes golang/go#22766

Change-Id: I0762a1bb9d8d30bb1ae6f1a98648795ea57b0913
Reviewed-on: https://go-review.googlesource.com/79499
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-17 15:46:28 +00:00
Sergiusz Bazanski b28c5379a5 gl: add OpenBSD support
This is the same as https://go-review.googlesource.com/c/exp/+/79917, but applied to the mobile project.

Change-Id: I77c7455317aaf09da8fbeaf943c14a2dab9da735
Reviewed-on: https://go-review.googlesource.com/79896
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-11-26 19:47:19 +00:00
Kevin Ruffin 37cf9e7ab8 cmd/gomobile: rename bundleId to bundleID
Renames the argument to the -bundleid command line flag to be
consistent with other parameter naming.

Change-Id: Icde0be0fbacb08712c415abce462070a84aa46d9
Reviewed-on: https://go-review.googlesource.com/79115
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-11-21 18:45:43 +00:00
Kevin Ruffin c0beac360c cmd/gomobile: add the -bundleid flag
The current gomobile build command fails when attempting to sign the application
indicating that a development team should be selected. These changes fix that
by auto-detecting the developer team ID and setting the
"allowProvisioningUpdates" flag on the xcodebuild command. The bundle ID of
the application is also allowed to be changed via another command line
parameter "bundleid".

Fixes golang/go#17407

Change-Id: Ib0b878424a95a0cd49f3655ed4de56b2b91ff7a0
Reviewed-on: https://go-review.googlesource.com/77070
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2017-11-18 10:20:10 +00:00
Kyohei Kadota 2a5bbaa217 cmd/gobind: fix a typo that is missing quote at end
Change-Id: I91ffbda9c8f562bc66b75ca8a6360196d41c1b28
Reviewed-on: https://go-review.googlesource.com/74610
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2017-10-31 14:28:16 +00:00
Elias Naur 2f6753be0d example/bind/ios/bind.xcodeproj: disable bitcode in Xcode settings
Go compiles to machine code, not bitcode and Xcode will complain if
the bitcode setting is left enabled (the default).

Change-Id: If2caca0b70419c2901b5bfc159669307be39f964
Reviewed-on: https://go-review.googlesource.com/72670
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2017-10-23 18:25:25 +00:00
Daniel Skinner eed0461ac2 cmd/gomobile: icon support for android
Provides support for resources.arsc generation enabling
the setting of an application icon.

If an asset/icon.png is encountered during build, then
the resources.arsc is generated to identify a single
xxxhdpi resource and the manifest will be updated to
reference resource as app icon.

References golang/go#9985

Change-Id: I9ef59fff45dcd612a41c479b2c679d22c094ab36
Reviewed-on: https://go-review.googlesource.com/30019
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2017-10-17 01:04:57 +00:00
Elias Naur 3ef91fec25 cmd/gomobile, internal/mobileinit: update to the NDK unified headers
From r16, the legacy headers no longer ship with the NDK. Update
the gomobile build system to use the unified headers instead.
They're available from r14.

Based on a patch by Steeve Morin.

Fixes golang/go#21802

Change-Id: I098330962c737edb833e968fe82558e15837f23f
Reviewed-on: https://go-review.googlesource.com/69950
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2017-10-11 16:08:37 +00:00
James Treanor 72d8d1135a bind: fix CLANG_WARN_STRICT_PROTOTYPES errors for generated ObjC code
Xcode 9 now enables CLANG_WARN_STRICT_PROTOTYPES by default.

This update ObjC function prototypes with no params from

FOUNDATION_EXPORT Something* DoSomething();

to

FOUNDATION_EXPORT Something* DoSomething(void);

Change-Id: I23b1d3e70a2ede2d2d77951ffe8a1a9598a1b7a0
Reviewed-on: https://go-review.googlesource.com/68970
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2017-10-09 16:20:38 +00:00
Alexandre Parentea e095d655c7 gl: support (Create|Bind|Delete)VertexArray for GL ES 3
Change-Id: Ief6b7f4ab2450d7f1c3b961b19304b10b3680abd
Reviewed-on: https://go-review.googlesource.com/61370
Reviewed-by: Elias Naur <elias.naur@gmail.com>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2017-09-10 23:20:06 +00:00
Elias Naur 9bd992d065 bind,cmd/gomobile: fix follow ups to doc generator CL (52330)
Also, add tests for blank, anonymous and multiple struct fields.

Change-Id: I15e6fff8d1684f2a31e99e1adf023b92f1f3cb48
Reviewed-on: https://go-review.googlesource.com/59550
Reviewed-by: Alan Donovan <adonovan@google.com>
2017-09-05 18:43:28 +00:00
Elias Naur 05f1abc543 bind,cmd: generate ObjC and Java documentation
Convert Go documentation to JavaDoc tags (/** ... */).

Since the .aar file format doesn't support source files, gomobile
will create a package-sources.jar along with the main package.aar.

For Objective-C, JavaDoc-style comments seems to work as well,
judging by manual inspection of Xcode quick help.

Change-Id: I47fe5b6804681d459a873be37a44610d392166ef
Reviewed-on: https://go-review.googlesource.com/52330
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2017-08-25 16:30:26 +00:00
Elias Naur b2ece8c621 bind: declare implemented ObjC protocols
Declare all implemented interfaces in the protocol list of a bound
struct. This is the ObjC equivalent of similar functionality for
Java.

Change-Id: Ibaea881f57fecf8a0716d25ec925de43974fe0fe
Reviewed-on: https://go-review.googlesource.com/52010
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2017-08-22 15:31:44 +00:00
Elias Naur e66540375e bind: generate ObjC initializers
For functions on the form

New<T>... (...) *T

or

New<T>... (...) (*T, error)

generate corresponding initializers. The name of an initializer is
the function name where "New<T>" is replaced by "init".

If no functions match for a type *T, generate a default (empty)
initializer that returns new(T). The default initializer mirrors
the default constructor in Java.

Fixes golang/go#20254.

Change-Id: I3c317418fa517d3f2de3f67f400867285b11ea4f
Reviewed-on: https://go-review.googlesource.com/52012
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2017-08-11 20:43:43 +00:00
pankona 448c916b90 x/mobile/gl: fix building if gldebug tag is specified
in gldebug.go, Enum value TIMEOUT_IGNORED requires uint64 length
to handle it. On the other hand, Enum is declared as uint32, it causes
build error because of overflow.

Since GL_TIMEOUT_IGNORED is not a kind of GLenum, it should not be
listed in that switch statement. Introduce white list for available
Enum value to exclude such variables they cannot be classified as Enum
because of its variable length.

Fixes golang/go#17075

Change-Id: Ic1a4ee72b313861e48fe3e1cfaec91c91da6ddb3
Reviewed-on: https://go-review.googlesource.com/53531
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2017-08-09 07:17:13 +00:00
Elias Naur 202a52f8ee bind: remove erroneous class to name replacer
The name replacement is done in asMethod.

Change-Id: I9aedf1231c0563f53e3a34f29197e106c090ee6e
Reviewed-on: https://go-review.googlesource.com/51871
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2017-08-03 22:24:39 +00:00
Hana Kim 683b305bdb misc/androidstudio: version up gradle plugin to 0.2.9
Change-Id: Icedef49c575937fca885e050e569e513bb7880f7
Reviewed-on: https://go-review.googlesource.com/49258
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2017-07-17 18:12:14 +00:00
Ernest Chiang 901bda64d6 misc/androidstudio: check on javaCompile to avoid exception
In commit https://git.io/vQ1gV, the classpath was delayed evaluated to
the task executions. But at Library mode, there will be exception
because the javaCompile involved is not intialized. Add check to fix it.

Change-Id: I23ab2374a704de9fd7bf74ccfaed255045032b3d
Reviewed-on: https://go-review.googlesource.com/48050
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2017-07-11 14:22:22 +00:00
Dan Ballard e1125eeafd cmd/gobind: add GOROOT to cmd.Env from ctx.GOROOT
In two places gobind launches go commands but does not pass along
the system's GOROOT causing the subprocess go's to look in
/usr/local/go and fail if GOROOT is not there.

Fixes golang/go#18209

Change-Id: Ica9455c0b15ba57afc5699b7757d67aa4231c508
Reviewed-on: https://go-review.googlesource.com/46671
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2017-06-27 08:56:46 +00:00
Péter Szilágyi 44a54e9b78 bind: accept null objects as nil pointers
Currently the generated bindings assume that any object
passed to Go as a method argument is actually a valid one
originating from Go. The `null` object is however a corner
case to this assumption, which should be accepted for Go
pointer types, since they can cleanly convert into `nil`.

This CL modifies the generated wrapper code so any `nil`
reference is permitted for Go pointer types, which until
now produced a nil pointer dereference error.

Fixes golang/go#20330

Change-Id: If1ab9cf9df7ac3808486d23ccf2db8d32fb89426
Reviewed-on: https://go-review.googlesource.com/43253
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2017-05-24 10:27:38 +00:00
Elias Naur 0f3174026e internal/importers: reverse bind types from unexported struct fields
Before this CL, unexported fields were ignored for the purposes of
determining which classes a Go struct should extend or implement.
However, the field types were also ignored, resulting in the types
not being generated at all. This CL adds the types of unexported
fields to the set of types to be generated.

Fixes golang/go#17945

Change-Id: I5c6c44b7cdfe0c3d4c4dc44863ae201dca7ae9a4
Reviewed-on: https://go-review.googlesource.com/38635
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2017-04-19 17:20:05 +00:00
Elias Naur dedec14c61 cmd/gomobile: update documentation to reflect Go 1.7 requirement
CL 35953 bumped the minimum required version to Go 1.7. Update the
gomobile documentation to reflect that.

Change-Id: I7cd7937471eb16456a51e8f41bae331344860888
Reviewed-on: https://go-review.googlesource.com/40919
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2017-04-18 12:40:40 +00:00
Elias Naur eb9032959f cmd/gobind: update export data for imported packages
CL 30093 removed the go install step from gobind to avoid errors from
circular dependencies with Java reverse wrapper. However, if a
dependency is either never installed or outdated, gobind will fail.

Reinstate the go install step, but ignore errors from the go install
tool.

Tested manually by wiping the $GOPATH/pkg directory and running the
cmd/gobind tests.

Updates golang/go#19046

Change-Id: I31832eccab09b2a7cf29e5d5bc1cc76963b7c2ef
Reviewed-on: https://go-review.googlesource.com/37326
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2017-03-07 11:58:33 +00:00
Elias Naur 57e7952fd5 cmd/gomobile: fix openal init test
Updates golang/go#19046

Change-Id: I0fc8fedc179d24ec9691528cab98857f3f9a4291
Reviewed-on: https://go-review.googlesource.com/37327
Reviewed-by: Jaana Burcu Dogan <jbd@google.com>
2017-03-03 23:32:52 +00:00
Elias Naur 2057caeb27 exp/gl/glutil: disable test
The test broke a long time ago when the underlying API changed.
It seems too useful to remove outright, so disable it until someone
cares enough to update it.

Updates golang/go#19046.

Change-Id: Iec49be30fbc2e3ffd6fa73e584b15a481751049f
Reviewed-on: https://go-review.googlesource.com/37321
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2017-02-21 20:02:19 +00:00