I did the following:
- Create a new macOS project.
- Include a dependency on https://github.com/apple/swift-syntax.git via Swift Package Manager.
- Choose exact version and use version number
0.50300.0(since I'm using Xcode 12.4 and that is the highest version supported).
When I launch the app, I get the runtime error:
dyld: Library not loaded: @rpath/lib_InternalSwiftSyntaxParser.dylib
Referenced from: ....
Reason: image not found
The readme mentions that:
SwiftSyntax depends on the lib_InternalSwiftSyntaxParser.dylib/.so library which provides a C interface to the underlying Swift C++ parser. When you do swift build SwiftSyntax links and uses the library included in the Swift toolchain. If you are building an application make sure to embed _InternalSwiftSyntaxParser as part of your application's libraries.
You can either copy lib_InternalSwiftSyntaxParser.dylib/.so directly from the toolchain...
How can I find this file in the toolchain?
How do I "embed _InternalSwiftSyntaxParser"?