homebrew-core
homebrew-core copied to clipboard
swift-format 0.50700.0
Created with brew bump-formula-pr
.
Running the binary fails with
dyld[95921]: Library not loaded: '@rpath/lib_InternalSwiftSyntaxParser.dylib'
Referenced from: '/opt/homebrew/Cellar/swift-format/0.50700.0/bin/swift-format'
Reason: tried: '/usr/lib/swift/lib_InternalSwiftSyntaxParser.dylib' (no such file), '/opt/homebrew/Cellar/swift-format/0.50700.0/bin/lib_InternalSwiftSyntaxParser.dylib' (no such file), '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.5/macosx/lib_InternalSwiftSyntaxParser.dylib' (no such file), '/usr/lib/swift/lib_InternalSwiftSyntaxParser.dylib' (no such file), '/opt/homebrew/Cellar/swift-format/0.50700.0/bin/lib_InternalSwiftSyntaxParser.dylib' (no such file), '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.5/macosx/lib_InternalSwiftSyntaxParser.dylib' (no such file), '/usr/local/lib/lib_InternalSwiftSyntaxParser.dylib' (no such file), '/usr/lib/lib_InternalSwiftSyntaxParser.dylib' (no such file)
Where should we be looking for lib_InternalSwiftSyntaxParser.dylib
?
Here's what I have on my system, with both Xcode 14.0 (with Swift 5.7) and the Swift 5.6.3 toolchain installed:
$ find /Library -name lib_InternalSwiftSyntaxParser.dylib
/Library/Developer/CommandLineTools/usr/lib/swift/macosx/lib_InternalSwiftSyntaxParser.dylib
/Library/Developer/Toolchains/swift-5.6.3-RELEASE.xctoolchain/usr/lib/swift/macosx/lib_InternalSwiftSyntaxParser.dylib
And in /Applications
, with both Xcode 14.0 and Xcode 13.4.1 installed:
$ find /Applications -name lib_InternalSwiftSyntaxParser.dylib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/lib_InternalSwiftSyntaxParser.dylib
/Applications/Xcode_13.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/lib_InternalSwiftSyntaxParser.dylib
The relevant change that broke rpath is: https://github.com/apple/swift-package-manager/pull/4208.
swift-syntax works around this via: https://github.com/apple/swift-syntax/commit/4f33e361829415ab913778a582eda3ad682f81c1.
I think lib_InternalSwiftSyntaxParser
will be dropped as a dependency altogether in swift-format 0.50800.0 (Swift 5.8) from what I've seen.
Just realized it also gets pulled into the build and output as an artifact:
$ find . -name lib_InternalSwiftSyntaxParser.dylib
.build/release/lib_InternalSwiftSyntaxParser.dylib
Ok, it wants the library to be in /opt/homebrew/Cellar/swift-format/0.50700.0/bin
, but I'd really rather not do that. Any ideas for a workaround?
macOS build is now working, but Linux build is failing due to https://github.com/apple/swift-format/issues/381 (which is due to https://github.com/apple/swift-syntax/issues/749).
Actually, this just requires Swift 5.7 to build, so waiting on that. #110520
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. To keep this pull request open, add a help wanted
or in progress
label.
This is still waiting on Swift 5.7 support
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. To keep this pull request open, add a help wanted
or in progress
label.