Skip to content

Bump Swift version to 4.0 #8861

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Apr 28, 2017
Merged

Bump Swift version to 4.0 #8861

merged 21 commits into from
Apr 28, 2017

Conversation

tkremenek
Copy link
Member

@tkremenek tkremenek commented Apr 19, 2017

rdar://problem/31899950

@tkremenek
Copy link
Member Author

@swift-ci clean test

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - b7b9245
Test requested by - @tkremenek

@tkremenek
Copy link
Member Author

@swift-ci clean test

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - b7b9245
Test requested by - @tkremenek

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - b7b9245
Test requested by - @tkremenek

@erg
Copy link
Contributor

erg commented Apr 19, 2017

@tkremenek The other place to change is in build-script:

    parser.add_argument(
        "--swift-user-visible-version",
        help="User-visible version of the embedded Swift compiler",
        type=arguments.type.swift_compiler_version,
        default="3.1", # change to 4.0
        metavar="MAJOR.MINOR")

Note: The build-script-impl version flag was made into dead code by a refactoring to python by someone else months ago, but I only removed it last week upon discovering it was dead.

@tkremenek
Copy link
Member Author

@swift-ci clean test

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - dcc43ec
Test requested by - @tkremenek

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - dcc43ec
Test requested by - @tkremenek

Copy link
Contributor

@jrose-apple jrose-apple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, we need to continue building the standard library and overlays with Swift 3 as well.

@dabrahams
Copy link
Contributor

dabrahams commented Apr 20, 2017 via email

@tkremenek
Copy link
Member Author

@dabrahams makes a good point. The intent is we want the Standard Library and overlays building in Swift 4 mode.

@tkremenek
Copy link
Member Author

@DougGregor reminded me offline that the Standard Library/overlays can vend Swift 4 changes with @available markup. Let's review outside this PR whether we need to build these libraries in Swift 4 mode.

@tkremenek
Copy link
Member Author

@swift-ci clean test

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 7c664d1
Test requested by - @tkremenek

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - 7c664d1
Test requested by - @tkremenek

@tkremenek
Copy link
Member Author

@swift-ci test linux

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 6106868
Test requested by - @tkremenek

@tkremenek
Copy link
Member Author

Please test with following pull request:
swiftlang/swift-corelibs-foundation#956

@swift-ci test linux

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - d36b0b6
Test requested by - @tkremenek

@tkremenek
Copy link
Member Author

Please test with following pull request:
swiftlang/swift-corelibs-xctest#188
swiftlang/swift-corelibs-foundation#956

@swift-ci test linux

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - d36b0b6
Test requested by - @tkremenek

@tkremenek
Copy link
Member Author

Please test with following pull request:
swiftlang/swift-corelibs-xctest#188
swiftlang/swift-corelibs-foundation#956

@swift-ci test linux

@tkremenek
Copy link
Member Author

@swift-ci clean test

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 157133d
Test requested by - @tkremenek

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - 157133d
Test requested by - @tkremenek

@tkremenek
Copy link
Member Author

@swift-ci test

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - ef98f2b
Test requested by - @tkremenek

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - ef98f2b
Test requested by - @tkremenek

@tkremenek
Copy link
Member Author

On Linux it looks like we are down to a test failure in swift-corelibs-Foundation:

TestFoundation/HTTPServer.swift:101:20: error: 'subscript' is unavailable
00:31:25             return str[startIndex..<endIndex]
00:31:25                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
00:31:25 Swift.String:3:12: note: 'subscript' was obsoleted in Swift 4
00:31:25     public subscript(bounds: Range<String.Index>) -> String { get }
00:31:25            ^
00:31:25 
TestFoundation/HTTPServer.swift:101:20: error: 'subscript' is unavailable
00:31:25             return str[startIndex..<endIndex]
00:31:25                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
00:31:25 Swift.String:3:12: note: 'subscript' was obsoleted in Swift 4
00:31:25     public subscript(bounds: Range<String.Index>) -> String { get }
00:31:25            ^

@tkremenek
Copy link
Member Author

Please test with following pull request:
swiftlang/swift-corelibs-foundation#972

@swift-ci test linux

@tkremenek
Copy link
Member Author

Also seeing on iphoneSimulator:

/Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/swift/test/DebugInfo/ErrorVar.swift:19:12: error: expected string not found in input
01:05:25  // CHECK: ![[ERRTY]] = !DICompositeType({{.*}}identifier: "_T0s5Error_pD"
01:05:25            ^
01:05:25 <stdin>:768:1: note: scanning from here
01:05:25 !90 = !DIExpression(DW_OP_deref)
01:05:25 ^
01:05:25 <stdin>:768:1: note: with variable "ERRTY" equal to "85"
01:05:25 !90 = !DIExpression(DW_OP_deref)
01:05:25 ^
01:05:25 <stdin>:773:3: note: possible intended match here
01:05:25 !95 = !DISubroutineType(types: !96)
01:05:25   ^
01:05:25 

but this looks like a new, unrelated failure.

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 42ea938
Test requested by - @tkremenek

@tkremenek
Copy link
Member Author

With:

swiftlang/swift-corelibs-foundation#972

the swift-corelibs-foundation tests pass. Now I am seeing the following test failure for swift-corelibs-xctest:

error: expression type 'XCTestCaseEntry' (aka '(testCaseClass: XCTestCase.Type, allTests: Array<(String, (XCTestCase) throws -> ())>)') is ambiguous without more context
06:52:46 XCTMain([testCase(MisuseTestCase.allTests)])
06:52:46          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
06:52:46 

@tkremenek
Copy link
Member Author

Please test with following pull request:
swiftlang/swift-corelibs-foundation#972
swiftlang/swift-corelibs-xctest#189

@swift-ci test linux

@tkremenek
Copy link
Member Author

@swift-ci clean test

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - 42ea938
Test requested by - @tkremenek

@tkremenek
Copy link
Member Author

I think @adrian-prantl address the ErrorVar.swift failure in:

#9105

@tkremenek
Copy link
Member Author

@swift-ci test macOS

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - 42ea938
Test requested by - @tkremenek

@tkremenek
Copy link
Member Author

I am seeing new test failures that appear unrelated. Looks like new breakage on master. Merging.

@tkremenek tkremenek merged commit 749e05b into swiftlang:master Apr 28, 2017
@shajrawi
Copy link

All the linux bots are failing with static_assert(SWIFT_VERSION_MAJOR == 4 in swift/lib/Basic/Version.cpp:329
looking at the build logs I see -DSWIFT_VERSION=3.1 -DSWIFT_VERSION_MAJOR=3 -DSWIFT_VERSION_MINOR=1

@swiftix
Copy link
Contributor

swiftix commented Apr 28, 2017

@shajrawi You need a clean build to get rid of it

@tkremenek
Copy link
Member Author

@shajrawi yeah sorry about that; apparently changing the version in the build-script doesn't reflect as a build dependency. I've triggered the bots to clean their workspaces.

@tkremenek tkremenek deleted the ver-4-bump branch April 29, 2017 00:02
@adrian-prantl
Copy link
Contributor

AFAIK, this is an inherent limitation of CMake. Once configuration parameters are cached, they can only be reset by removing the CMake cache.

@jrose-apple
Copy link
Contributor

Maybe we shouldn't be marking that variable as "CACHE"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants