Skip to content

[CSApply] Always use String type for ObjC interop key path #29866

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 1 commit into from
Feb 17, 2020

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Feb 15, 2020

If it's possible to build an Objective-C key path for key path
expression make sure that its implicitly generated string literal
expression has a String type.

Resolves: rdar://problem/57356196

If it's possible to build an Objective-C key path for key path
expression make sure that its implicitly generated string literal
expression has a `String` type.

Resolves: rdar://problem/57356196
@xedin xedin requested a review from jckarter February 15, 2020 08:08
@xedin
Copy link
Contributor Author

xedin commented Feb 15, 2020

@swift-ci please smoke test

@xedin
Copy link
Contributor Author

xedin commented Feb 15, 2020

@swift-ci please test source compatibility

@xedin
Copy link
Contributor Author

xedin commented Feb 15, 2020

SwiftNIO failures are unrelated:

/Users/buildnode/jenkins/workspace/swift-PR-source-compat-suite/swift-source-compat-suite/project_cache/swift-nio-extras/.build/checkouts/swift-nio/Sources/NIOHTTP1/HTTPResponseCompressor.swift:41:18: error: 'init(_:)' is only available in macOS 9999 or newer
    let qValue = Float(headerParts[1].split(separator: "=", maxSplits: 1, omittingEmptySubsequences: false)[1]) ?? 0
                 ^
/Users/buildnode/jenkins/workspace/swift-PR-source-compat-suite/swift-source-compat-suite/project_cache/swift-nio-extras/.build/checkouts/swift-nio/Sources/NIOHTTP1/HTTPResponseCompressor.swift:41:18: note: add 'if #available' version check
    let qValue = Float(headerParts[1].split(separator: "=", maxSplits: 1, omittingEmptySubsequences: false)[1]) ?? 0
                 ^
/Users/buildnode/jenkins/workspace/swift-PR-source-compat-suite/swift-source-compat-suite/project_cache/swift-nio-extras/.build/checkouts/swift-nio/Sources/NIOHTTP1/HTTPResponseCompressor.swift:34:14: note: add @available attribute to enclosing global function
private func qValueFromHeader(_ text: String) -> Float {
             ^

@xedin
Copy link
Contributor Author

xedin commented Feb 15, 2020

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - ae79b0d

@xedin
Copy link
Contributor Author

xedin commented Feb 15, 2020

@swift-ci please test Linux platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - ae79b0d

@xedin
Copy link
Contributor Author

xedin commented Feb 15, 2020

@swift-ci please test Linux platform

@tkremenek
Copy link
Member

@swift-ci clean test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - ae79b0d

@xedin
Copy link
Contributor Author

xedin commented Feb 17, 2020

@swift-ci please test Linux platform

@xedin
Copy link
Contributor Author

xedin commented Feb 17, 2020

There is a lot of flakiness on Linux

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - ae79b0d

@xedin
Copy link
Contributor Author

xedin commented Feb 17, 2020

@swift-ci please test Linux platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - ae79b0d

@xedin
Copy link
Contributor Author

xedin commented Feb 17, 2020

@swift-ci please test Linux platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - ae79b0d

@xedin
Copy link
Contributor Author

xedin commented Feb 17, 2020

@swift-ci please test Linux platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - ae79b0d

@xedin
Copy link
Contributor Author

xedin commented Feb 17, 2020

@swift-ci please test Linux platform

Copy link
Contributor

@CodaFi CodaFi left a comment

Choose a reason for hiding this comment

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

LGTM. There's now the slim possibility that you'll set a null type in here, but if that happens we'd have crashed somewhere else.

@xedin xedin merged commit 48f24b0 into swiftlang:master Feb 17, 2020
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.

4 participants