sindresorhus / macos-trash

Move files and folders to the trash
MIT License
377 stars 14 forks source link

Won't compile on macOS 10.14.5/Swift version 5.0.1 #6

Closed jjarava closed 5 years ago

jjarava commented 5 years ago

Hi!

Trying to find a "command line trash" tool for macOS that protects you from accidentally deleting files on a networked drive (see https://github.com/ali-rantakari/trash/issues/32), I've found this project and wanted to try it, but I can't get to compile on my system:

jjarava$ ./build
/work/jjarava/pers/programacion_svn/build-dir/macos-trash-master: error: manifest parse error(s):
/work/jjarava/pers/programacion_svn/build-dir/macos-trash-master/Package.swift:7:4: error: ambiguous reference to member 'macOS'
                .macOS(.v10_9)
                 ^    ~~~~~~~~
/work/jjarava/pers/programacion_svn/build-dir/macos-trash-master/Package.swift:7:4: note: overloads for 'macOS' exist with these partially matching parameter lists: (SupportedPlatform.MacOSVersion), (String)
                .macOS(.v10_9)
                 ^
jjarava$ swift --version
Apple Swift version 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5)
Target: x86_64-apple-darwin18.6.0
sindresorhus commented 5 years ago

Fixed :)

jjarava commented 5 years ago

Works, although I get a warning:

$ ./build warning: Swift compiler no longer supports statically linking the Swift libraries. They're included in the OS by default starting with macOS Mojave 10.14.4. For macOS Mojave 10.14.3 and earlier, there's an optional Swift library package that can be downloaded from "More Downloads" for Apple Developers at https://developer.apple.com/download/more/ [2/2] Linking ./.build/x86_64-apple-macosx/release/trash

Guess that's why the binary is so small (32 k)

sindresorhus commented 5 years ago

Yes, see the note I added to the readme.