Skip to content

Unified: Extract Swift actors - #23056

Open
paldepind wants to merge 2 commits into
mainfrom
unified/actor-decl
Open

paldepind wants to merge 2 commits into
mainfrom
unified/actor-decl

Conversation

@paldepind

@paldepind paldepind commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Map Swift actorDecl nodes to class-like declarations, preserving modifiers, generic parameters and constraints, inherited types, and members. Reuse class-style implicit initializer handling.

@paldepind
paldepind marked this pull request as ready for review November 9, 2026 13:01
@paldepind
paldepind requested a review from a team as a code owner November 9, 2026 13:01
Copilot AI auto review requested due to automatic review settings November 9, 2026 13:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Actor fixture coverage does not exercise the new modifier, generic, constraint, or inheritance captures, nor verify that an explicit initializer prevents generation of an additional initializer.

1 open issue
What changed in this PR

This PR adds Swift actor support to the unified extractor, representing actors as class-like declarations while retaining the actor modifier.

Changes:

  • Preserve declaration modifiers, generic parameters and constraints, inherited types, and members.
  • Reuse class-style implicit initializer handling.
  • Regenerate the existing actor fixture’s expected output.
File Description
unified/​extractor/​tests/​corpus/​swift/​types/​actor-declaration.output Replaces unsupported-node output with an actor declaration and generated initializer.
unified/​extractor/​src/​languages/​swift/​swift.rs Adds actor translation and removes the unsupported-node fallback.

Review effort: Balanced (auto)

Comment on lines +1352 to +1356
genericParameterClause: (genericParameterClause
parameters: _* @params
genericWhereClause: (genericWhereClause requirements: _* @parameter_constraints)?)?
inheritanceClause: (inheritanceClause inheritedTypes: (inheritedType type: @bases)*)?
genericWhereClause: (genericWhereClause requirements: _* @declaration_constraints)?

@paldepind paldepind Nov 9, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the Swift actor-support changes.

1 open issue

Review effort: Balanced (auto)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants