Skip to content

generate extensions of wrapper types owned by other modules - #852

Open
Tatenda-k wants to merge 2 commits into
swiftlang:mainfrom
Tatenda-k:main
Open

generate extensions of wrapper types owned by other modules#852
Tatenda-k wants to merge 2 commits into
swiftlang:mainfrom
Tatenda-k:main

Conversation

@Tatenda-k

Copy link
Copy Markdown

##What
Teaches wrap-java to generate a Swift extension of a wrapper type that is defined in a different Swift module, containing only the members whose signatures or return type references at least one type wrapped by the module being generated.
Opt in per-module via a new manifest field:
"extendForeginclasses": ["java.lang.Class"]

Scope/Follow-up

This PR adds the capability + tests. It does not yet delete the hand-written
JavaClass+Reflection.swift: the wrap-java tool itself calls several of those
JavaClass methods, so the generated JavaClass+Extensions.swift must be
produced and committed (a one-time bootstrap) before the hand-written file can be
trimmed. Tracked as follow-up.
addresses #18

@Tatenda-k
Tatenda-k requested a review from ktoso as a code owner July 27, 2026 17:11
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