-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Unavail the Darwin.abs function to avoid collisions with Swift.abs #23956
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
Also marks M_PI etc obsoleted instead of merely deprecated (which they have been since Swift 3.0).
@swift-ci please test |
@swift-ci please test source compatibility |
Shouldn't a similar change be done in the Windows SDK overlay? |
Probably, but I know nothing about what APIs Windows does (or should) provide, so I will leave that to someone else. |
These versions are language versions, and there is no "Swift 5.1" language version. I'm afraid you can't do this conditionally. |
(I mean, you can, but it won't have any effect until we get a |
@jrose-apple bad news for the obsoletion of flatMap, too:
Since these are tied to the Darwin overlay, they can plausibly use macOS etc. versions instead, but if they were stdlib features (like |
I remember mentioning this there too, and getting the response that it was okay since it would eventually have an effect. That's different from trying to avoid collisions, though. (Are the collisions actually a problem? I thought we said the standard library is always shadowed by what's in other libraries when there's a perfect overload.) |
@jrose-apple The collision is a problem because |
This is often not ideal for the specific case of the platform overlay. We want the stdlib to be shadowed by user libraries, but in the case of Platform, we are actively trying to provide more of that functionality in the stdlib, so more often than not we would prefer the stdlib versions to get picked up. |
The platform overlay currently isn't treated specially by the compiler, and I don't think this would be sufficient reason to do so. |
I agree, hence the removals. |
…ugh. I misread the patch from the beginning, and thought you were using |
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.
Please leave it to the human readable form squareRoot
instead of the cryptic sqrt
name (squirt?) as it's not following the Swift guidelines. Or address this renaming in a separate pull request.
@Coeur
We'll have both |
@stephentyrone well, I just noticed that you did replace |
@Coeur What changed is SE-0246. Prior to that the only spelling provided by stdlib was |
OK, I've just read the proposal SE-0246 and the review, and nobody ever mentioned |
We're punting on this until we have an actual language version to tie it to. |
Also marks M_PI etc obsoleted instead of merely deprecated (which they have been since Swift 3.0).
Fixes rdar://problem/44044108