Skip to content
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

[SR-10798] [Foundation] Protocol conformance mismatch between Darwin and Linux #3328

Open
ikesyo mannequin opened this issue May 30, 2019 · 4 comments
Open

[SR-10798] [Foundation] Protocol conformance mismatch between Darwin and Linux #3328

ikesyo mannequin opened this issue May 30, 2019 · 4 comments

Comments

@ikesyo
Copy link
Mannequin

ikesyo mannequin commented May 30, 2019

Previous ID SR-10798
Radar None
Original Reporter @ikesyo
Type Bug
Environment
  • Trunk: swift-DEVELOPMENT-SNAPSHOT-2019-05-11-a and later

  • 5.1: swift-5.1-DEVELOPMENT-SNAPSHOT-2019-05-21-a and later

Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug
Assignee None
Priority Medium

md5: bddd247a59722f1d5b5bd66660a67999

Issue Description:

Because of https://github.com/apple/swift-corelibs-foundation/pull/2234 some Foundation reference types are now Comparable on Linux, but not on Darwin (Objective-C Foundation).

  • NSNumber

  • NSString

  • NSDateInterval

  • NSDate

  • NSIndexPath

This mismatch introduces source incompatibility between Darwin and Linux. https://github.com/Quick/Nimble/blob/54d4f5a71ca62eb62032251cf4661bbdebe2645c/Sources/Nimble/Matchers/MatcherProtocols.swift#L131-L157 and https://travis-ci.org/Quick/Nimble/builds/539263555 is an actual case.

The fact that the types are now Comparable is desirable I think, so making them conform to Comparable on Darwin as well will be good.

@ikesyo
Copy link
Mannequin Author

ikesyo mannequin commented Jun 25, 2019

Any interest? @millenomi and @parkera

@millenomi
Copy link
Contributor

This was partly intentional as part of implementing NSSortDescriptor in SCF; see https://github.com/apple/swift-corelibs-foundation/blob/master/Docs/ReleaseNotes_Swift5.md#nssortdescriptor-changes

I can not commit to anything re: Darwin, though your interest is noted. Would it make your life easier if they weren’t Comparable (i.e., if compatibility was restored?)

@millenomi
Copy link
Contributor

The question more specifically is: given that it is understood you’d like them to be Comparable everywhere; assuming the status quo on Darwin remains as is; would you prefer they stay the same (not Comparable) right now?

@ikesyo
Copy link
Mannequin Author

ikesyo mannequin commented Jun 28, 2019

The difference is a maintenance burden at lease for me, so ideally both on Darwin and SCF they should be Comparable. Reverting the conformance on SCF is not what I want.

So

  • Please consider for making them Comparable on Darwin (Foundation Overlay)

  • If it can't happen at all, let's close the issue (marking as "wont' fix")

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant