Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/mobile: copy comments to generated headers #25473

Closed
joseelin opened this issue May 21, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@joseelin
Copy link

commented May 21, 2018

use golang build mobile library for other developers,mybe include comments better
source code

// NSDictionary for en-us
type NSDictionary interface {
	// Get get value
	Get(key string) string
	// Has has value
	Has(key string) bool
}

command:gomobile bind -v -target=ios ...
output framework header

@interface HttpNSDictionary : NSObject <goSeqRefInterface, HttpNSDictionary> {
}
@property(strong, readonly) id _ref;

- (instancetype)initWithRef:(id)ref;
- (NSString*)get:(NSString*)key;
- (BOOL)has:(NSString*)key;
@end

want include comments

//for en-us
@interface HttpNSDictionary : NSObject <goSeqRefInterface, HttpNSDictionary> {
}
@property(strong, readonly) id _ref;

- (instancetype)initWithRef:(id)ref;
//get value
- (NSString*)get:(NSString*)key;
//has value
- (BOOL)has:(NSString*)key;
@end

@bcmills bcmills changed the title gomobile bind can export comments? x/mobile: copy comments to generated headers May 21, 2018

@gopherbot gopherbot added this to the Unreleased milestone May 21, 2018

@gopherbot gopherbot added the mobile label May 21, 2018

@bcmills

This comment has been minimized.

Copy link
Member

commented May 21, 2018

@gopherbot

This comment has been minimized.

Copy link

commented May 21, 2018

Change https://golang.org/cl/114056 mentions this issue: cmd/gobind: copy documentation to generated source

@gopherbot

This comment has been minimized.

Copy link

commented May 21, 2018

Change https://golang.org/cl/114055 mentions this issue: bind: copy documentation for interface methods to ObjC

gopherbot pushed a commit to golang/mobile that referenced this issue May 22, 2018

Elias Naur
bind: copy documentation for interface methods to ObjC
Updates golang/go#25473

Change-Id: I63bf8dde15b0f108eabdc653b59039607b47a0aa
Reviewed-on: https://go-review.googlesource.com/114055
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>

MarkVillacampa added a commit to MarkVillacampa/mobile that referenced this issue Jun 26, 2018

bind: copy documentation for interface methods to ObjC
Updates golang/go#25473

Change-Id: I63bf8dde15b0f108eabdc653b59039607b47a0aa
Reviewed-on: https://go-review.googlesource.com/114055
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>

MarkVillacampa added a commit to MarkVillacampa/mobile that referenced this issue Jun 26, 2018

cmd/gobind: copy documentation to generated source
CL 99316 moved generation of bindings from the the gomobile command
to the gobind command. In the process, the ability to copy over
documentation from the Go source to the derived Java and ObjC was
lost. The relevant test didn't fail because it tests the generator
itself, not gobind.

Re-add support and add a gobind test for it.

Fixes golang/go#25473

Change-Id: I6eee3e79173f37d3e3e65eabc0bad59e4252da64
Reviewed-on: https://go-review.googlesource.com/114056
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.