Skip to content

Finish implementing @abi (SE-0476) #81115

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

beccadax
Copy link
Contributor

@beccadax beccadax commented Apr 26, 2025

This PR contains the last few changes to officially implement @abi as a supported feature:

  • Adds some macro tests that haven't landed yet.
  • Restricts @abi to PatternBindingDecls with a single variable, per review feedback.
  • Makes @abi a supported feature:
    • Changes the feature name from ABIAttribute to ABIAttributeSE0476 to defend against condfails.
    • Removes ASTGen mapping to experimental SwiftSyntax feature.

This change requires a matching SwiftSyntax PR to make the syntax nodes no longer experimental: swiftlang/swift-syntax#3065

Resolves rdar://150065196.

Additional tests for the previous commit “Diagnose CustomAttrs as needed in `@abi`”.
Additional tests for the previous commit “[Legacy parser] No freestanding macros in `@abi`”.
Per a comment in the review thread that the comma in a multi-variable pattern binding makes it look like the `@abi` attribute has several arguments.
This includes changing the feature name so that compilers with the experimental feature don’t accidentally pick up content that only works in the final version.

Resolves rdar://150065196.
@beccadax
Copy link
Contributor Author

This PR is a draft pending approval of SE-0476.

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.

1 participant