Skip to content
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

Added correct detection of conformance scopes when inside a public extension #132

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

bok-
Copy link
Contributor

@bok- bok- commented Dec 13, 2024

📒 Description

Vexil 3's @FlagContainer macro generates conformances to FlagContainer and Equatable. At the moment we were only looking at the attached declaration to see if we needed to generate public conformances, but if we're inside a public extension we wouldn't know. eg:

public extension SomeContainer {
    @FlagContainer
    struct SomeFlags {}
}

🔍 Detailed Design

This PR uses SwiftSyntax 6's lexical context to look at the declaration's parent and see if its a public extension.

@bok- bok- added the vexil3 Part of the Vexil 3 alpha/beta development label Dec 13, 2024
@bok- bok- merged commit 6a74b6e into main Dec 13, 2024
39 checks passed
@bok- bok- deleted the public-extensions branch December 13, 2024 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vexil3 Part of the Vexil 3 alpha/beta development
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant