I have a syntax which works perfectly when run from the main thread, but when I wrap it like this:
DispatchQueue.global().async {
let syntax = try SyntaxParser.parse(sourceURL)
let result = myRewriter.visit(syntax)
}
I get an ExecBadAccess
several layers deep into visitChildren
Is there a reason related to SwiftSyntax why this should not work?
I'm using the Swift 5.1 release of SwiftSyntax if it matters.