yonaskolb / Mint

A package manager that installs and runs executable Swift packages
MIT License
2.27k stars 122 forks source link

Can't run swift-format@0.50700.0 due to missing lib_InternalSwiftSyntaxParser.dylib #247

Closed shimastripe closed 2 years ago

shimastripe commented 2 years ago

Recent apple/swift-format@@0.50700.0 need lib_InternalSwiftSyntaxParser.dylib. https://github.com/apple/swift-format/issues/381#issuecomment-1253909414

However mint seems to be copied only swift-format single binary through build process artifacts. Manually I added lib_InternalSwiftSyntaxParser.dylib into ~/.mint/packages/github.com_apple_swift-format/build/0.50700.0, then it worked! How to solve this?

$ mint run swift-format dump-configuration
🌱 Cloning swift-format 0.50700.0
🌱 Resolving package
🌱 Building package
🌱 Installed swift-format 0.50700.0
🌱 Running swift-format 0.50700.0...
dyld[19728]: Library not loaded: '@rpath/lib_InternalSwiftSyntaxParser.dylib'
  Referenced from: '/Users/shimastripe/.mint/packages/github.com_apple_swift-format/build/0.50700.0/swift-format'
  Reason: tried: '/Users/shimastripe/.mint/packages/github.com_apple_swift-format/build/0.50700.0/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), '/Users/shimastripe/.mint/packages/github.com_apple_swift-format/build/0.50700.0/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)
[1]    19728 abort      mint run swift-format dump-configuration
kkebo commented 2 years ago

Same here, maybe related to #120.

shimastripe commented 2 years ago

I checked this problem was resolved in mint 0.17.2. Thanks your quick PR! @fummicc1