Skip to content

Commit

Permalink
example/reverse: delete
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Elias Naur committed Mar 16, 2018
1 parent 0d74d72 commit 961c1a6
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 144 deletions.
1 change: 0 additions & 1 deletion example/reverse/android/README

This file was deleted.

55 changes: 0 additions & 55 deletions example/reverse/android/build.gradle

This file was deleted.

20 changes: 0 additions & 20 deletions example/reverse/android/src/main/AndroidManifest.xml

This file was deleted.

20 changes: 0 additions & 20 deletions example/reverse/android/src/main/res/layout/activity_main.xml

This file was deleted.

8 changes: 0 additions & 8 deletions example/reverse/android/src/main/res/values/dimens.xml

This file was deleted.

40 changes: 0 additions & 40 deletions example/reverse/reverse/reverse.go

This file was deleted.

0 comments on commit 961c1a6

Please sign in to comment.