Skip to content

[Swiftify] Emit @availability when expansions contain Span (#81320) #81388

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

Merged

Conversation

hnrklssn
Copy link
Contributor

@hnrklssn hnrklssn commented May 8, 2025

This prevents errors when compiling for older targets using a newer compiler.

rdar://150740330
(cherry picked from commit 59d7d31)

  • Explanation:
    This changes the _SwiftifyImport macro and ClangImporter so that the generated macro overloads for SafeInteropWrappers are annotated with the appropriate @availability attribute when they refer to Span/MutableSpan. Not doing so would result in errors when targeting older OSs.
  • Scope:
    This only affects code using the experimental SafeInteropWrappers feature flag.
  • Issues:
    rdar://150740330
  • Original PRs:
    [Swiftify] Emit @availability when expansions contain Span #81320
  • Risk:
    The risk should be low because it only affects code opting in to the experimental SafeInteropWrappers feature
  • Testing:
    Manual testing, lit tests
  • Reviewers:
    @DougGregor

…#81320)

This prevents errors when compiling for older targets using a newer
compiler.

rdar://150740330
(cherry picked from commit 59d7d31)
@hnrklssn hnrklssn requested a review from a team as a code owner May 8, 2025 23:45
@hnrklssn hnrklssn requested a review from DougGregor May 9, 2025 00:48
@hnrklssn
Copy link
Contributor Author

hnrklssn commented May 9, 2025

@swift-ci please test

@devincoughlin devincoughlin merged commit 2e941ef into swiftlang:release/6.2 May 13, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants