-
Notifications
You must be signed in to change notification settings - Fork 52
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
Stop using opaque return types to resolve build error #38
Conversation
@swift-ci test |
I think we should remove the usage of opaque result type for now |
TBH I don't agree - I don't think pre-Catalina Darwin deployment targets are still a major use case, especially for a package like this one which is intended primarily for the server ecosystem. |
While I agree, other packages like swift-nio-extras depend on this package and we don't want to ask all of them to bump the supported OS versions. |
Hm, yeah, that's a good point. It's a shame, though - the opaque result types are so much cleaner 😕 |
Yeah. Do you want to update the PR? Should be fine to just move |
…`some` rather than forcing other packages to change their manifests.
@guoye-zhang PR updated, let me know if I missed anything! |
I haven't fully looked into this but we are already using opaque return types in other packages so I don't think backing the usage out here is needed. |
It fails when building the package in Xcode and select "Any Mac" as the target since it tries to back deploy to macOS 10.13 |
Is changing the opaque argument necessary? I thought that's fine to back deploy |
I removed all usage out of an abundance of caution. But yeah, the failure only shows up when building an Xcode project with a generic destination, it's not a configuration/scenario I'd really expect there to be any coverage of. |
@FranzBusch Is it safe to delete the tag to unship the version? We can investigate this a bit further next week |
Don’t delete the tag: instead, ship a new tag that reverts to the prior version with a higher version number. |
@swift-ci test |
@guoye-zhang Thanks for taking care of this so quickly! |
When the 1.0.1 release introduced the use of opaque return types (
some Collection<>
etc.), it broke certain Xcode builds. Specifically:platform
declarations, or declares a minimum supported platform of less than macOS Catalina/iOS 13 etc.Such builds fail immediately with this error:
Adding the missing platform specifiers, as this PR does, fixes the issue by correctly declaring the now-required minimums.Edit: See discussion below; for the time being, rather than add platform requirements, the use of opaque types has been removed instead.
(N.B.: Technically, this means that 1.0.1 introduced an accidental
semver-major
break due to source incompatibility; under SwiftPM rules, raising a minimum platform/OS version requirement is always a breaking change, even if - as in my case - no deployment to older platforms was actually happening.)For the record, I am running Sonoma 14.1.2, Xcode and Swift versions are:
(Xcode 15.1 beta 3)
The same failure also occurred with Xcode 15.0.1.