As stated in the Async/await proposal, I'm trying to run the latest main snapshot with
in order to test the current implementation.
I'm running macOS Catalina 10.15.7 (19H2), I have Xcode 12.0.1 (12A7300). I installed the most recent Trunk Development Snapshot from here, I set it in Xcode and created a command line Xcode project having the above flags under Build Settings > Swift Compiler - Custom Flags > Other Swift Flags. In order to check the output of the main file I need to build it and run it by double clicking on the built product from the Finder. It does the job but I feel like it's not the best way to do it.
Is there a way to have the output show in Xcode directly?
Alternatively, is there a way to run that toolchain from command line?
I tried with
xcrun --toolchain /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2020-10-29-a swift -Xfrontend -enable-experimental-concurrency
but it looks like the flag doesn't get used. I also tried with
/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2020-10-29-a.xctoolchain/usr/bin/swift -Xfrontend -enable-experimental-concurrency
but I'm getting the following error:
dyld: Library not loaded: @rpath/Python3.framework/Versions/3.8/Python3 Referenced from: /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2020-10-29-a.xctoolchain/System/Library/PrivateFrameworks/LLDB.framework/Versions/A/LLDB Reason: image not found zsh: abort -Xfrontend -enable-experimental-concurrency
Even better, is there a way to set flags in a Playground?
Is there a better way to do it? Via
swiftenvmaybe? How do you set up testing for downloaded snapshots?
If I need to run swift code on the fly, I usually do it in the terminal within the REPL run via the
swift command or in a Playground page (that would be optimal, but I suppose there's no way to set flags within Playground projects).
Thank you in advance,