Example failing - like #1 #2

Open
opened 2021-06-02 15:33:05 -04:00 by PhenixH · 1 comment
First-time contributor

Hi,

First, thank you for this incredible work.

I have the same issue for the example app:
SDK version: MacOSX10.15.sdk

clang version

Apple clang version 12.0.0 (clang-1200.0.32.28)
Target: x86_64-apple-darwin19.6.0

go generate

Generating AST
clang -xobjective-c -Xclang -ast-dump -fsyntax-only -fno-color-diagnostics /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h
Building nodes
Assembling tree
--processing translation unit
AST parse error: node type is *ast.SwiftNameAttr
--processing translation unit
AST parse error: node type is *ast.SwiftNameAttr
Writing output to ns/main.go
Interface NSAutoreleasePool: 0 properties, 36 class methods, 214 instance methods
Interface NSString: 36 properties, 73 class methods, 416 instance methods
Interface NSLayoutConstraint: 13 properties, 40 class methods, 234 instance methods
Interface NSDictionary: 5 properties, 50 class methods, 493 instance methods
Interface NSObject: 18 properties, 35 class methods, 238 instance methods
Interface NSView: 104 properties, 42 class methods, 951 instance methods
Interface NSMenu: 17 properties, 41 class methods, 590 instance methods
Interface NSWindow: 119 properties, 50 class methods, 931 instance methods
Interface NSControl: 25 properties, 50 class methods, 1141 instance methods
Interface NSNotification: 3 properties, 39 class methods, 246 instance methods
Interface NSApplication: 30 properties, 38 class methods, 692 instance methods
Interface NSMenuItem: 29 properties, 38 class methods, 571 instance methods
Interface NSButton: 23 properties, 67 class methods, 1511 instance methods
Interface NSArray: 5 properties, 46 class methods, 602 instance methods
Delegate AppDelegate <NSApplicationDelegate>: 4 methods
  subclass for NSButton
Adding methods for interface NSObject
Adding methods for interface NSResponder
Adding methods for interface NSView
Adding methods for interface NSControl
Adding methods for interface NSButton
METHODS:
  -> dealloc
Adding method pressed to subclass
Subclass GButton <NSButton>: 1 overrides, 1 new methods
1 functions
15 enums

go build

# git.wow.st/gmp/nswrap/examples/app/ns
ns/main.go:62161:35: expected type, found '.'
ns/main.go:64379:10: expected operand, found ')'
ns/main.go:64381:2: expected ')', found 'return'
ns/main.go:66823:10: expected operand, found ')'
ns/main.go:66825:2: expected ')', found 'return'
ns/main.go:69904:54: expected selector or type assertion, found ')'
ns/main.go:69905:22: missing ',' before newline in argument list
ns/main.go:69906:1: expected operand, found '}'
ns/main.go:69911:2: missing ',' in argument list
ns/main.go:69912:2: expected operand, found 'if'
ns/main.go:69915:4: missing ',' before newline in argument list

When i get a look for example line 62161 (we can notice the unexpected unsafe.Pointer)

type NS_RETURNS_INNER_POINTEunsafe.Pointer C.NS_RETURNS_INNER_POINTER_void

Is there a way to send you the resulting main.go and the result of the clang requested command ?

Hi, First, thank you for this incredible work. I have the same issue for the example app: SDK version: MacOSX10.15.sdk clang version ``` Apple clang version 12.0.0 (clang-1200.0.32.28) Target: x86_64-apple-darwin19.6.0 ``` go generate ``` Generating AST clang -xobjective-c -Xclang -ast-dump -fsyntax-only -fno-color-diagnostics /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h Building nodes Assembling tree --processing translation unit AST parse error: node type is *ast.SwiftNameAttr --processing translation unit AST parse error: node type is *ast.SwiftNameAttr Writing output to ns/main.go Interface NSAutoreleasePool: 0 properties, 36 class methods, 214 instance methods Interface NSString: 36 properties, 73 class methods, 416 instance methods Interface NSLayoutConstraint: 13 properties, 40 class methods, 234 instance methods Interface NSDictionary: 5 properties, 50 class methods, 493 instance methods Interface NSObject: 18 properties, 35 class methods, 238 instance methods Interface NSView: 104 properties, 42 class methods, 951 instance methods Interface NSMenu: 17 properties, 41 class methods, 590 instance methods Interface NSWindow: 119 properties, 50 class methods, 931 instance methods Interface NSControl: 25 properties, 50 class methods, 1141 instance methods Interface NSNotification: 3 properties, 39 class methods, 246 instance methods Interface NSApplication: 30 properties, 38 class methods, 692 instance methods Interface NSMenuItem: 29 properties, 38 class methods, 571 instance methods Interface NSButton: 23 properties, 67 class methods, 1511 instance methods Interface NSArray: 5 properties, 46 class methods, 602 instance methods Delegate AppDelegate <NSApplicationDelegate>: 4 methods subclass for NSButton Adding methods for interface NSObject Adding methods for interface NSResponder Adding methods for interface NSView Adding methods for interface NSControl Adding methods for interface NSButton METHODS: -> dealloc Adding method pressed to subclass Subclass GButton <NSButton>: 1 overrides, 1 new methods 1 functions 15 enums ``` go build ``` # git.wow.st/gmp/nswrap/examples/app/ns ns/main.go:62161:35: expected type, found '.' ns/main.go:64379:10: expected operand, found ')' ns/main.go:64381:2: expected ')', found 'return' ns/main.go:66823:10: expected operand, found ')' ns/main.go:66825:2: expected ')', found 'return' ns/main.go:69904:54: expected selector or type assertion, found ')' ns/main.go:69905:22: missing ',' before newline in argument list ns/main.go:69906:1: expected operand, found '}' ns/main.go:69911:2: missing ',' in argument list ns/main.go:69912:2: expected operand, found 'if' ns/main.go:69915:4: missing ',' before newline in argument list ``` When i get a look for example line 62161 (we can notice the unexpected unsafe.Pointer) ``` type NS_RETURNS_INNER_POINTEunsafe.Pointer C.NS_RETURNS_INNER_POINTER_void ``` Is there a way to send you the resulting main.go and the result of the clang requested command ?
Owner

The last update should fix this.

The last update should fix this.
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gmp/nswrap#2
No description provided.