jextract: generate one output swift file per input file - #403
Merged
ktoso merged 4 commits intoOct 24, 2025
Merged
Conversation
ktoso
commented
Oct 16, 2025
ktoso
force-pushed
the
wip-write-into-per-file-output-files
branch
from
October 16, 2025 13:07
5aac152 to
0b09a7e
Compare
Collaborator
Author
|
Pending some cleanups and handling the JNI mode |
ktoso
force-pushed
the
wip-write-into-per-file-output-files
branch
from
October 16, 2025 13:15
0b09a7e to
f389162
Compare
ktoso
force-pushed
the
wip-write-into-per-file-output-files
branch
from
October 24, 2025 11:36
f389162 to
d6cc154
Compare
Rather than generating an output file per TYPE which we did before. The per-type mode cannot work correctly because SwiftPM expects to know all the output Swift files. So we'd have to parse sources and determine up front what the outputs will be -- doable, but problematic -- instead, we now generate files based on input files, and map which type goes into which output file. This makes it also easier to find where thunks are -- they are in the same named file as the original type or func was declared in. This may have some edge case problems still. Resolves swiftlang#365
ktoso
force-pushed
the
wip-write-into-per-file-output-files
branch
from
October 24, 2025 12:07
d6cc154 to
afc0c5a
Compare
ktoso
marked this pull request as ready for review
October 24, 2025 12:08
ktoso
force-pushed
the
wip-write-into-per-file-output-files
branch
from
October 24, 2025 12:27
15b5fac to
499ea03
Compare
ktoso
force-pushed
the
wip-write-into-per-file-output-files
branch
from
October 24, 2025 14:12
e5e7f4e to
72ce01b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rather than generating an output file per TYPE which we did before.
The per-type mode cannot work correctly because SwiftPM expects to know all the output Swift files. So we'd have to parse sources and determine up front what the outputs will be -- doable, but problematic -- instead, we now generate files based on input files, and map which type goes into which output file.
This makes it also easier to find where thunks are -- they are in the same named file as the original type or func was declared in.
This may have some edge case problems still.
Resolves #365