-
Notifications
You must be signed in to change notification settings - Fork 116
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
AvailabilityParser marks iOSApplicationExtension, unavailable
-annotated properties as universally deprecated
#450
Comments
First of all, thank you for submitting such a detailed bug report. There is a few thing I'd like to confirm:
|
Before we fix the issue, in your specific issue, you can workaround by using the following code snippet: @available(iOSApplicationExtension, unavailable)
@available(iOS 13.0, *) // Or whatever version you like
public class MyClass: NSObject { } |
Ah, yep! 🤦 Let me fix that.
Sorry, typo, I meant 14.1 (Build 14B47b).
Thanks, we'll try that! And thanks for the quick fix! |
Confirm to be fixed by #712. This is causing some downstream user(eg. stripe-ios) to use workaround code. Should we cherry-pick the fix back to release/5.10. CC @franklinsch @mayaepps |
Description
When generating our SDK docs with DocC, classes marked as unavailable in Application Extensions are marked as deprecated in the generated docs.
Steps To Reproduce
Generated DocC page for PaymentSheet.FlowController
Class definition for PaymentSheet.FlowController
If we define our class:
The Swift compiler will output this in the symbol graph JSON:
And Swift-DocC will mark it as deprecated in the docs data JSON:
I think the issue is that the AvailabilityParser marks a symbol as deprecated if every Availability entry for a symbol is marked as
isUnconditionallyUnavailable
, even if the symbol is implicitly available in other domains. This final check seems incorrect:DocC already checks if a "universal deprecation" exists (a deprecation where
domain == nil
) just above that line, though I think it should also check if the domain is*
.Checklist
main
branch of this package.Expected Behavior
DocC marks it as available, or maybe marks it as "not available in Application Extensions".
Actual behavior
DocC marks the iOSApplicationExtension-unavailable class as Deprecated with a strikethrough effect.
Swift-DocC Version Information
Bundled in Xcode 14.1
Swift Compiler Version Information
The text was updated successfully, but these errors were encountered: