Xcode-8.3 (8W109m): Swift version reported as "3.0"

Originator:jp
Number:rdar://30215450 Date Originated:Jan 26
Status:Open Resolved:
Product:Xcode-8.3 (8W109m) Product Version:Xcode-8.3 (8W109m)
Classification:Other Bug Reproducible:Always
 
Summary:
Xcode 8.3 reports its Swift version as "3.0" rather than the expected "3.1". This makes it hard to conditionally compile portions of Swift code depending on the Swift version.

Swift 3.1 aims to be a source-compatible release with Swift 3.0.x, but in practice, that's not the case: https://twitter.com/simjp/status/824682896879292416

It's impossible to guarantee full source compatibility, so even if the differences that I'm aware of are addressed, there will likely be others, so having a way to conditionally compile code is critical.

Steps to Reproduce:
/Applications/Xcode-8.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift --version 
Apple Swift version 3.0 (swiftlang-802.0.27.2 clang-802.0.27.2)
Target: x86_64-apple-macosx10.9

Expected Results:
Xcode 8.3 should report a Swift version of 3.1.

Actual Results:
Xcode 8.3 reports a Swift version of 3.0.

Regression:
Describe circumstances where the problem occurs or does not occur, such as software versions and/or hardware configurations.

Notes:
Provide additional information, such as references to related problems, workarounds and relevant attachments.

Comments

06-Feb-2017 01:59 PM

Fixed in Xcode 8.3 beta 2.

30-Jan-2017 11:49 PM

Duplicate of 30081411 (Open)


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!