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

Unhandled type kind objCObject when trying to bind Foundation.framework on macOS #282

Open
LunaTheFoxgirl opened this issue Jul 25, 2022 · 0 comments
Labels

Comments

@LunaTheFoxgirl
Copy link

I need more or less to bind the entirety of Foundation.framework, but whenever anything depends on NSObject.h it falls apart.

luna@Dev-Mac objc-d % sudo dstep /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h -o source/objc/string.d -ObjC
dstep: an unknown error occurred: core.exception.AssertError@dstep/translator/Type.d(623): Unhandled type kind objCObject
----------------
??:? _d_assert_msg [0x1008eab6f]
??:? immutable(char)[] dstep.translator.Type.translateType(dstep.translator.Context.Context, clang.c.Index.CXTypeKind, bool) [0x10091a697]
??:? dstep.translator.Output.SourceNode dstep.translator.Type.translateType(dstep.translator.Context.Context, clang.Cursor.Cursor, clang.Type.Type, bool, bool) [0x100916117]
??:? dstep.translator.Output.SourceNode dstep.translator.Type.translateObjCObjectPointerType(dstep.translator.Context.Context, clang.Cursor.Cursor, clang.Type.Type) [0x100918d13]
??:? dstep.translator.Output.SourceNode dstep.translator.Type.translateType(dstep.translator.Context.Context, clang.Cursor.Cursor, clang.Type.Type, bool, bool) [0x10091602f]
??:? dstep.translator.Output.SourceNode dstep.translator.Translator.translateFunction(dstep.translator.Context.Context, clang.Cursor.FunctionCursor, immutable(char)[], bool) [0x10092452f]
??:? void dstep.translator.objc.ObjcInterface.ObjcInterface!(dstep.translator.Output.ClassExtensionData).ObjcInterface.translateMethod(clang.Cursor.FunctionCursor, bool, immutable(char)[]) [0x100922977]
??:? int dstep.translator.objc.ObjcInterface.ObjcInterface!(dstep.translator.Output.ClassExtensionData).ObjcInterface.translate(dstep.translator.Output.Output).__lambda3().__foreachbody1(ref clang.Cursor.Cursor, ref clang.Cursor.Cursor) [0x1009224f7]
??:? int function(ref clang.Cursor.Cursor, ref clang.Cursor.Cursor) clang.Visitor.DeclarationVisitor.opApply(int delegate(ref clang.Cursor.Cursor, ref clang.Cursor.Cursor)).__foreachbody2 [0x10092254f]
??:? extern (C) clang.c.Index.CXChildVisitResult clang.Visitor.Visitor.visitorFunction(clang.c.Index.CXCursor, clang.c.Index.CXCursor, void*) [0x1009157e7]
??:? _ZN5clang8cxcursor13CursorVisitor5VisitE8CXCursorb [0x10c384f13]
??:? _ZN5clang8cxcursor13CursorVisitor23handleDeclForVisitationEPKNS_4DeclE [0x10c387007]
??:? _ZN5clang8cxcursor13CursorVisitor16VisitDeclContextEPNS_11DeclContextE [0x10c3870c7]
??:? _ZN5clang8cxcursor13CursorVisitor21VisitObjCCategoryDeclEPNS_16ObjCCategoryDeclE [0x10c388e5f]
??:? _ZN5clang8cxcursor13CursorVisitor13VisitChildrenE8CXCursor [0x10c385597]
??:? clang_visitChildren [0x10c393a83]
??:? void dstep.translator.objc.ObjcInterface.ObjcInterface!(dstep.translator.Output.ClassExtensionData).ObjcInterface.translate(dstep.translator.Output.Output) [0x100921f4b]
??:? void dstep.translator.Translator.Translator.translate(dstep.translator.Output.Output, clang.Cursor.Cursor, clang.Cursor.Cursor) [0x10092afdf]
??:? void dstep.translator.Translator.Translator.translateInGlobalScope(dstep.translator.Output.Output, clang.Cursor.Cursor, clang.Cursor.Cursor) [0x10092abab]
??:? int dstep.translator.Translator.Translator.translateCursors().__foreachbody3(ref clang.Cursor.Cursor, ref clang.Cursor.Cursor) [0x100959103]
??:? int function(ref clang.Cursor.Cursor, ref clang.Cursor.Cursor) clang.Visitor.InOrderVisitor.opApply(int delegate(ref clang.Cursor.Cursor, ref clang.Cursor.Cursor)).__foreachbody11 [0x100959307]
??:? extern (C) clang.c.Index.CXChildVisitResult clang.Visitor.Visitor.visitorFunction(clang.c.Index.CXCursor, clang.c.Index.CXCursor, void*) [0x1009157e7]
??:? _ZN5clang8cxcursor13CursorVisitor5VisitE8CXCursorb [0x10c384f13]
??:? _ZN5clang8cxcursor13CursorVisitor23handleDeclForVisitationEPKNS_4DeclE [0x10c387007]
??:? _ZN5clang8cxcursor13CursorVisitor16VisitDeclContextEPNS_11DeclContextE [0x10c3870c7]
??:? _ZN5clang8cxcursor13CursorVisitor13VisitChildrenE8CXCursor [0x10c38580f]
??:? clang_visitChildren [0x10c393a83]
??:? dstep.translator.Output.Output dstep.translator.Translator.Translator.translateCursors() [0x10092a68f]
??:? immutable(char)[] dstep.translator.Translator.Translator.translateToString() [0x10092a9ef]
??:? void dstep.translator.Translator.Translator.translate() [0x1009294b3]
??:? int dstep.driver.Application.Application.run().__foreachbody5(std.typecons.Tuple!(immutable(char)[], immutable(char)[], clang.TranslationUnit.TranslationUnit).Tuple) [0x100963ff3]
??:? void std.parallelism.ParallelForeach!(std.range.ZipShortest!(1, immutable(char)[][], immutable(char)[][], clang.TranslationUnit.TranslationUnit[]).ZipShortest).ParallelForeach.opApply(scope int delegate(std.typecons.Tuple!(immutable(char)[], immutable(char)[], clang.TranslationUnit.TranslationUnit).Tuple)).doIt() [0x10096419f]
??:? void std.parallelism.submitAndExecute(std.parallelism.TaskPool, void delegate()) [0x1008c8a23]
??:? void dstep.driver.Application.Application.run() [0x1009635db]
??:? _Dmain [0x10096afe7]
core.exception.AssertError@dstep/translator/Type.d(623): Unhandled type kind objCObject
----------------
??:? _d_assert_msg [0x1008eab6f]
??:? immutable(char)[] dstep.translator.Type.translateType(dstep.translator.Context.Context, clang.c.Index.CXTypeKind, bool) [0x10091a697]
??:? dstep.translator.Output.SourceNode dstep.translator.Type.translateType(dstep.translator.Context.Context, clang.Cursor.Cursor, clang.Type.Type, bool, bool) [0x100916117]
??:? dstep.translator.Output.SourceNode dstep.translator.Type.translateObjCObjectPointerType(dstep.translator.Context.Context, clang.Cursor.Cursor, clang.Type.Type) [0x100918d13]
??:? dstep.translator.Output.SourceNode dstep.translator.Type.translateType(dstep.translator.Context.Context, clang.Cursor.Cursor, clang.Type.Type, bool, bool) [0x10091602f]
??:? dstep.translator.Output.SourceNode dstep.translator.Translator.translateFunction(dstep.translator.Context.Context, clang.Cursor.FunctionCursor, immutable(char)[], bool) [0x10092452f]
??:? void dstep.translator.objc.ObjcInterface.ObjcInterface!(dstep.translator.Output.ClassExtensionData).ObjcInterface.translateMethod(clang.Cursor.FunctionCursor, bool, immutable(char)[]) [0x100922977]
??:? int dstep.translator.objc.ObjcInterface.ObjcInterface!(dstep.translator.Output.ClassExtensionData).ObjcInterface.translate(dstep.translator.Output.Output).__lambda3().__foreachbody1(ref clang.Cursor.Cursor, ref clang.Cursor.Cursor) [0x1009224f7]
??:? int function(ref clang.Cursor.Cursor, ref clang.Cursor.Cursor) clang.Visitor.DeclarationVisitor.opApply(int delegate(ref clang.Cursor.Cursor, ref clang.Cursor.Cursor)).__foreachbody2 [0x10092254f]
??:? extern (C) clang.c.Index.CXChildVisitResult clang.Visitor.Visitor.visitorFunction(clang.c.Index.CXCursor, clang.c.Index.CXCursor, void*) [0x1009157e7]
??:? _ZN5clang8cxcursor13CursorVisitor5VisitE8CXCursorb [0x10c384f13]
??:? _ZN5clang8cxcursor13CursorVisitor23handleDeclForVisitationEPKNS_4DeclE [0x10c387007]
??:? _ZN5clang8cxcursor13CursorVisitor16VisitDeclContextEPNS_11DeclContextE [0x10c3870c7]
??:? _ZN5clang8cxcursor13CursorVisitor21VisitObjCCategoryDeclEPNS_16ObjCCategoryDeclE [0x10c388e5f]
??:? _ZN5clang8cxcursor13CursorVisitor13VisitChildrenE8CXCursor [0x10c385597]
??:? clang_visitChildren [0x10c393a83]
??:? void dstep.translator.objc.ObjcInterface.ObjcInterface!(dstep.translator.Output.ClassExtensionData).ObjcInterface.translate(dstep.translator.Output.Output) [0x100921f4b]
??:? void dstep.translator.Translator.Translator.translate(dstep.translator.Output.Output, clang.Cursor.Cursor, clang.Cursor.Cursor) [0x10092afdf]
??:? void dstep.translator.Translator.Translator.translateInGlobalScope(dstep.translator.Output.Output, clang.Cursor.Cursor, clang.Cursor.Cursor) [0x10092abab]
??:? int dstep.translator.Translator.Translator.translateCursors().__foreachbody3(ref clang.Cursor.Cursor, ref clang.Cursor.Cursor) [0x100959103]
??:? int function(ref clang.Cursor.Cursor, ref clang.Cursor.Cursor) clang.Visitor.InOrderVisitor.opApply(int delegate(ref clang.Cursor.Cursor, ref clang.Cursor.Cursor)).__foreachbody11 [0x100959307]
??:? extern (C) clang.c.Index.CXChildVisitResult clang.Visitor.Visitor.visitorFunction(clang.c.Index.CXCursor, clang.c.Index.CXCursor, void*) [0x1009157e7]
??:? _ZN5clang8cxcursor13CursorVisitor5VisitE8CXCursorb [0x10c384f13]
??:? _ZN5clang8cxcursor13CursorVisitor23handleDeclForVisitationEPKNS_4DeclE [0x10c387007]
??:? _ZN5clang8cxcursor13CursorVisitor16VisitDeclContextEPNS_11DeclContextE [0x10c3870c7]
??:? _ZN5clang8cxcursor13CursorVisitor13VisitChildrenE8CXCursor [0x10c38580f]
??:? clang_visitChildren [0x10c393a83]
??:? dstep.translator.Output.Output dstep.translator.Translator.Translator.translateCursors() [0x10092a68f]
??:? immutable(char)[] dstep.translator.Translator.Translator.translateToString() [0x10092a9ef]
??:? void dstep.translator.Translator.Translator.translate() [0x1009294b3]
??:? int dstep.driver.Application.Application.run().__foreachbody5(std.typecons.Tuple!(immutable(char)[], immutable(char)[], clang.TranslationUnit.TranslationUnit).Tuple) [0x100963ff3]
??:? void std.parallelism.ParallelForeach!(std.range.ZipShortest!(1, immutable(char)[][], immutable(char)[][], clang.TranslationUnit.TranslationUnit[]).ZipShortest).ParallelForeach.opApply(scope int delegate(std.typecons.Tuple!(immutable(char)[], immutable(char)[], clang.TranslationUnit.TranslationUnit).Tuple)).doIt() [0x10096419f]
??:? void std.parallelism.submitAndExecute(std.parallelism.TaskPool, void delegate()) [0x1008c8a23]
??:? void dstep.driver.Application.Application.run() [0x1009635db]
??:? _Dmain [0x10096afe7]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants