Skip to content

ExtraStringAPI: Sync with the overlay version #1406

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
Jan 25, 2018

Conversation

spevans
Copy link
Contributor

@spevans spevans commented Jan 24, 2018

  • The three functions are obsoleted in Swift 4.0. The bodies from
    the overlay wont compile due to use of internal symbols so replace
    with a fatalError() call which isnt used anyway.

  • Update callers of advanced(by:) to use index(offsetBy:).

- The three functions are obsoleted in Swift 4.0. The bodies from
  the overlay wont compile due to use of internal symbols so replace
  with a fatalError() call which isnt used anyway.

- Update callers of advanced(by:) to use index(offsetBy:).
@millenomi
Copy link
Contributor

@swift-ci Please test.

return String.UTF16View.Index(encodedOffset: encodedOffset.advanced(by: n))
}
}
/// Construct from an integer offset.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a way we can change this from an obsoleted to a renamed with instead, so that callers have the opportunity of a fixit to change? Alternatively, instead of just using "Unavailable" can we have a more descriptive message as to what they need to replace this with instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For advanced(by:) would this suffice (I don't think a rename can be used in its place. ) ?
@available(swift, obsoleted: 4.0, message: "Use index(_,offsetBy:) instead.")

Im not sure what the alternatives are for the other 2 although I could remove them entirely since adding obsoleted functions does not really make sense anyway.

Copy link
Contributor

Choose a reason for hiding this comment

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

We seem to be moving towards keeping them in for a release or two because then the compile error is clearer than 'can't find it'.

@millenomi
Copy link
Contributor

@swift-ci Please test and merge.

@swift-ci swift-ci merged commit 7157437 into swiftlang:master Jan 25, 2018
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.

5 participants