Where is the source code for Swift 5.1.2?

While compiling Swift 5.1.2 on Linux I have found the following issues and would like some clarification on whether this is a problem and if a bug should be filed.

The swift-5.1-branch which Swift 5.1.2 should be built from is still versioned at 5.1.1

The tag swift-5.1.2-RELEASE does not appear to be for any current branch on Github.

If we do a comparison between the swift-5.1.1-RELEASE and the swift-5.1.2-RELEASE tags - https://github.com/apple/swift/compare/swift-5.1.1-RELEASE...swift-5.1.2-RELEASE
we can find a commit - https://github.com/apple/swift/commit/71def56d1a423b9cbac069ffa6e0169e61c9cd9b where the lib/Basic/Version.cpp has been hacked and "Swift version " SWIFT_VERSION_STRING " (swift-5.1.2-RELEASE)"; has been hard coded.

This commit also does not exist in any current branch on Github.

In every other version of Swift the version has been set in the CMakeLists.txt and 3 other files as in commit - https://github.com/apple/swift/commit/8332029dd6a278668753d4c5dac2de34987d6e10

When checking the version of Swift 5.1.1 using the official Swift.org release we get

Swift version 5.1.1 (swift-5.1.1-RELEASE)
Target: x86_64-unknown-linux-gnu

But when checking Swift 5.1.2 using the official Swift.org release we get

Swift version 5.1 (swift-5.1.2-RELEASE)
Target: x86_64-unknown-linux-gnu

The version is incorrectly displayed as 5.1, it should be 5.1.2

@tkremenek, @mishal_shah can you comment on this?

Thanks.

4 Likes

Iā€™m not sure what is going on here but I appreciate you surfacing this issue. A bunch of folks are out of the office this week (including me and Mishal) due to a Thanksgiving (in the USA) shutdown at Apple. We will take a look at this next week when everyone is back in the office.

1 Like

@futurejones Thanks for pointing this out to us!

We have resolved the issue and updated the new toolchains/tag for Swift 5.1.2.

Toolchains:
https://swift.org/builds/swift-5.1.2-release/xcode/swift-5.1.2-RELEASE/swift-5.1.2-RELEASE-osx.pkg
https://swift.org/builds/swift-5.1.2-release/ubuntu1804/swift-5.1.2-RELEASE/swift-5.1.2-RELEASE-ubuntu18.04.tar.gz
https://swift.org/builds/swift-5.1.2-release/ubuntu1604/swift-5.1.2-RELEASE/swift-5.1.2-RELEASE-ubuntu16.04.tar.gz
https://swift.org/builds/swift-5.1.2-release/ubuntu1404/swift-5.1.2-RELEASE/swift-5.1.2-RELEASE-ubuntu14.04.tar.gz

Tag: swift-5.1.2-RELEASE

$ ./swift-5.1.2-RELEASE-ubuntu14.04/usr/bin/swift --version 
Swift version 5.1.2 (swift-5.1.2-RELEASE)
Target: x86_64-unknown-linux-gnu

$ ./swift-5.1.2-RELEASE-ubuntu16.04/usr/bin/swift --version 
Swift version 5.1.2 (swift-5.1.2-RELEASE)
Target: x86_64-unknown-linux-gnu

$ ./swift-5.1.2-RELEASE-ubuntu18.04/usr/bin/swift --version
Swift version 5.1.2 (swift-5.1.2-RELEASE)
Target: x86_64-unknown-linux-gnu

$ /Library/Developer/Toolchains/swift-5.1.2-RELEASE.xctoolchain/usr/bin/swift --version 
Apple Swift version 5.1.2 (swift-5.1.2-RELEASE)
Target: x86_64-apple-darwin18.6.0
1 Like

@mishal_shah I am sorry but this doesn't make any sense.
Where is the commit that made these changes?
The swift-5.1-branch is still versioned at 5.1.1.

On further investigation I have found a new obscure branch pr-swift-version with this commit - https://github.com/apple/swift/commit/ed9117a4a219797a74db5dc595948bdeaac6a4d5.
Where did this branch come from? It is not from the swift-5.1-branch or the master.

Also the swift version string is still being hard coded in the lib/Basic/Version.cpp file.

The swift-5.1-branch is still versioned at 5.1.1 .

I was going to update these branches once swift-5.1-branch and master are open after the holiday break (Swift CI Holiday Schedule).

I created two pull requests to update the version:
master - https://github.com/apple/swift/pull/28513
swift-5.1-branch - https://github.com/apple/swift/pull/28514

Where did this branch come from? It is not from the swift-5.1-branch or the master .

To resolve the version issue for Swift 5.1.2, we made the fix on top of swift-5.1.2-RELEASE tag and created new toolchains.

Also the swift version string is still being hard coded in the lib/Basic/Version.cpp file.

We hard code the tag info in lib/Basic/Version.cpp to display (swift-5.1.2-RELEASE). This makes it easier for us to know which tag the compiler was built from. However, we don't hard code this in the master or release branch.

Ok , thanks for the clarification and sorry, missed the CI holiday notice. I didn't mean to interrupt your holidays.

No worries, thanks for pointing out the version issue!

Terms of Service

Privacy Policy

Cookie Policy