-
Notifications
You must be signed in to change notification settings - Fork 18
Swift 5.10+ warning: Date: Strideable conformance needs @retroactive #59
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
I'm sharing this issue & resolution to help other people who run into the same problem that I did.
Problem
Building a project that depends on SunKit 2.8.1 with Swift 5.10+ produces this warning:
extension declares a conformance of imported type 'Date' to imported protocol 'Strideable';
this will not behave correctly if the owners of 'Foundation' introduce this conformance in the future
This comes from Sources/SunKit/Extensions.swift:22:
extension Date: Strideable {Explanation
The fix (@retroactive) was already applied in f883b1f which is in the main branch. However, the most recent release tag 2.8.1 lags behind the main branch and there are currently no subsequent releases that include the fix.
Workaround
I modified my Package.swift and Package.resolved files to pin the specific known-good version:
.package(url: "https://github.com/SunKit-Swift/SunKit", revision: "a18a6f7")Request
Could you cut a new release (e.g. 2.8.2) that includes the @retroactive fix? This would be helpful to new users of the package that are likely to use the latest release tag by default.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working