Skip to content

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
@sonarqubecloud
Copy link

@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.

2 participants