Skip to content

[5.9][Macros] Allow extension macros to suppress conformances that are stated in the original source. #67083

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
merged 8 commits into from
Jul 3, 2023

Conversation

hborla
Copy link
Member

@hborla hborla commented Jul 2, 2023

hborla added 6 commits July 2, 2023 11:27
ConformanceMacro now refines ExtensionMacro, so these roles can share
the same expansion request.

(cherry picked from commit c3e214c)
…eady

stated in the original source.

If an extension macro can introduce protocol conformances, macro expansion
will check which of those protocols already have a stated conformance in the
original source. The protocols that don't will be passed as arguments to
extension macro expansion, indicating to the macro that it should only add
conformances to those protocols.

(cherry picked from commit 0bd898e)
…onformances:'

list of an attached extension macro attribute.

(cherry picked from commit 680c0b2)
@hborla hborla requested a review from a team as a code owner July 2, 2023 18:32
@hborla
Copy link
Member Author

hborla commented Jul 2, 2023

swiftlang/swift-syntax#1873

@swift-ci please test

I had to disable typo correction in one test case to get it to pass without
diagnosing a cycle as a result of Sendable checking. But that's OK, because:

- Sendable checking is prone to request cycles and needs to be redesigned
- Typo correction is turned off in production

(cherry picked from commit 89ad597)
@hborla
Copy link
Member Author

hborla commented Jul 3, 2023

swiftlang/swift-syntax#1873

@swift-ci please test

@hborla hborla merged commit b624759 into swiftlang:release/5.9 Jul 3, 2023
@hborla hborla deleted the 5.9-refine-extension-macros branch July 3, 2023 21:43
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.

3 participants