Skip to content

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

Merged
merged 1 commit into from
Oct 24, 2018

Conversation

Catfish-Man
Copy link
Contributor

The Foundation overlay still builds in Swift 3 mode, which is going away. We should fix that!

@Catfish-Man
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@itaiferber itaiferber left a 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")
Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor

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.

Copy link
Contributor

@phausler phausler left a 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")
Copy link
Contributor

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.

@Catfish-Man Catfish-Man merged commit bd109be into master Oct 24, 2018
@Catfish-Man Catfish-Man deleted the david/Foundation-overlay-swift-5 branch October 24, 2018 00:06
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