Request.syntaxTree not found "key.serialized_syntax_tree" in Apple Silicon M2 Xcode14.3
Opened this issue · 1 comments
let file = File(contents: "class A {}")
let result = try SourceKittenFramework.Request.syntaxTree(file: file, byteTree: false).send()
print(result)
apple silicon M2 xcode14.3, "key.serialized_syntax_tree" is not found in result
["key.diagnostic_stage": "source.diagnostic.stage.swift.parse"]
intel xcode14.1,is ok
["key.diagnostic_stage": "source.diagnostic.stage.swift.parse", "key.serialized_syntax_tree": "{"kind":"SourceFile","layout":[{"kind":"CodeBlockItemList","layout":[{"kind":"CodeBlockItem","layout":[{"kind":"ClassDecl","layout":[null,null,{"tokenKind":{"kind":"kw_class"},"leadingTrivia":"","trailingTrivia":" ","presence":"Present"},{"tokenKind":{"kind":"identifier","text":"A"},"leadingTrivia":"","trailingTrivia":" ","presence":"Present"},null,null,null,{"kind":"MemberDeclBlock","layout":[{"tokenKind":{"kind":"l_brace"},"leadingTrivia":"","trailingTrivia":"","presence":"Present"},{"kind":"MemberDeclList","layout":[],"presence":"Present"},{"tokenKind":{"kind":"r_brace"},"leadingTrivia":"","trailingTrivia":"","presence":"Present"}],"presence":"Present"}],"presence":"Present"},null,null],"presence":"Present"}],"presence":"Present"},{"tokenKind":{"kind":"eof","text":""},"leadingTrivia":"","trailingTrivia":"","presence":"Present"}],"presence":"Present"}"]
I think SourceKit in Xcode 14.3 doesn't return a serialized syntax tree anymore. I think you're meant to use the SwiftSyntax library to get that instead.