-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Foundation overlay needs to build with -swift-version 5 #19999
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
Conversation
@swift-ci please test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
@@ -664,6 +678,8 @@ internal final class _DataStorage { | |||
_backing = .customMutableReference(data) | |||
case .customMutableReference(let d): | |||
d.replaceBytes(in: range, withBytes: replacementBytes, length: replacementLength) | |||
@unknown default: | |||
fatalError("Unknown Data backing type") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're going to have to come back and do something about these. If Data really can grow new representations, you'll need to make sure they're handled even in inlined code. Sadly we already have a pattern for this: https://twitter.com/UINT_MIN/status/1020503397357760512
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Argh :( ok, I should talk to @phausler about this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this code is going to have some changes coming in soon anyhow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the rest of this looks good to me.
@@ -664,6 +678,8 @@ internal final class _DataStorage { | |||
_backing = .customMutableReference(data) | |||
case .customMutableReference(let d): | |||
d.replaceBytes(in: range, withBytes: replacementBytes, length: replacementLength) | |||
@unknown default: | |||
fatalError("Unknown Data backing type") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this code is going to have some changes coming in soon anyhow.
The Foundation overlay still builds in Swift 3 mode, which is going away. We should fix that!