Installed the latest Trunk version of Swift from Swift.org - swift-DEVELOPMENT-SNAPSHOT-2016-03-24-a.xctoolchain
This is correctly set as the latest Toolchain /Library/Developer/Toolchains/swift-latest.xctoolchain -> /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-03-24-a.xctoolchain
"swift build --help" works
If I create an empty directory, "cd" into it and run "swift build --init executable" it creates the correct file structure
When I run "swift build -v -c debug" the command fails:
/usr/bin/xcrun --find swiftc
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc --driver-mode=swift -I /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-03-24-a.xctoolchain/usr/lib/swift/pm -L /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-03-24-a.xctoolchain/usr/lib/swift/pm -lPackageDescription -target x86_64-apple-macosx10.10 /Users/abizern/tmp/testspm/Package.swift -fileno 3
/Users/abizern/tmp/testspm/Package.swift:1:8: error: no such module 'PackageDescription'
import PackageDescription
^
error: exit(1): /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc --driver-mode=swift -I /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-03-24-a.xctoolchain/usr/lib/swift/pm -L /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-03-24-a.xctoolchain/usr/lib/swift/pm -lPackageDescription -target x86_64-apple-macosx10.10 /Users/abizern/tmp/testspm/Package.swift -fileno 3
But if I change the toolchain to the previous month's version:
"swift-latest.xctoolchain -> /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-02-25-a.xctoolchain"
It seems strange that I can't find anyone else having this problem on the forums.
It seems that the toolchain I downloaded didn't have a `swiftc` binary in the /usr/bin subfolder so it was defaulting to my system `/usr/bin/swiftc` No idea why it happened, or why multiple reinstalls didn't fix it. Just reinstalled the latest toolchain and it's there and it works.
/shrugs/