Closed s-hocking closed 3 years ago
I've also noticed the same problem show up when CI-safe Mockingbird is run for the first time via an Xcode build phase. The lib_InternalSwiftSyntaxParser.dylib
file is created in an unknown location and causes the same error about dylib #3
.
Thanks for reporting, this is an interesting edge case. We should be using POSIX.realpath()
to determine the dylib unbundling location. It should be a pretty straightforward change (only to the CLI launch code); happy to review PRs if anyone wants to take a shot (https://github.com/birdrides/mockingbird/wiki/Local-Development).
New Issue Checklist
Description
mockingbird generate
doesn't work when it is run for the first time via a symlink. Thelib_InternalSwiftSyntaxParser.dylib
file gets created in the same file location as the symlink, and Mockingbird complains that it can't find it.Running the Mockingbird binary directly creates the
lib_InternalSwiftSyntaxParser.dylib
in the same location as the real binary and works correctly. Once the.dylib
is in the right place, running Mockingbird via a symlink works correctly too.Generator Bugs
Environment
mockingbird version
) - 0.16.0swift --version
) - Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28), Target: x86_64-apple-darwin19.6.0.mockingbird-ignore
? - no