wrap-java revamp and add generic methods, types, and supertypes support - #397
Merged
Merged
Conversation
ktoso
force-pushed
the
wip-cleanup-wrapping-java-apis
branch
from
November 4, 2025 07:01
365c5e4 to
08e221e
Compare
ktoso
added a commit
to ktoso/swift-java
that referenced
this pull request
Nov 4, 2025
We had a lot of all-over-the-place logging which pretended to be loggers or just println + debug and info prefixes etc. This is getting out of hand and we should adopt a consistent logging mechanism. The way to do this in Swift is swift-log, there's no reason anymore to reinvent the wheel about it. The dependency is small and likely to be present in most libs. Especially the source gen we need not be concnerned about using swift-log. Runtime does not have to use it. This is just some initial steps, separated out from swiftlang#397
ktoso
added a commit
to ktoso/swift-java
that referenced
this pull request
Nov 5, 2025
We had a lot of all-over-the-place logging which pretended to be loggers or just println + debug and info prefixes etc. This is getting out of hand and we should adopt a consistent logging mechanism. The way to do this in Swift is swift-log, there's no reason anymore to reinvent the wheel about it. The dependency is small and likely to be present in most libs. Especially the source gen we need not be concnerned about using swift-log. Runtime does not have to use it. This is just some initial steps, separated out from swiftlang#397
ktoso
force-pushed
the
wip-cleanup-wrapping-java-apis
branch
5 times, most recently
from
November 10, 2025 15:01
dbe5302 to
81b5826
Compare
extract, just like the command does towards generic parent class in wrap-java mode
handle open class CompressingStore: AbstractStore<ByteArray, [UInt8], [UInt8]> {
ktoso
force-pushed
the
wip-cleanup-wrapping-java-apis
branch
from
November 10, 2025 15:09
81b5826 to
3b87d8f
Compare
ktoso
force-pushed
the
wip-cleanup-wrapping-java-apis
branch
from
November 11, 2025 03:38
64c69d7 to
537070f
Compare
ktoso
commented
Nov 11, 2025
| public func getTypeName() -> String | ||
|
|
||
| @JavaMethod | ||
| public func toString() -> String |
Collaborator
Author
There was a problem hiding this comment.
Need to properly fix this for all interfaces #430
understanding what's going on without being able to get toString of the java types is quite a problem, i'll tackle it next. This is obviously going to be thrown away (the edit in the generated source)
ktoso
force-pushed
the
wip-cleanup-wrapping-java-apis
branch
from
November 11, 2025 03:43
537070f to
d81ff4f
Compare
Collaborator
Author
|
Parking some of the enum fun for later #436 |
Collaborator
Author
|
This finally resolved the fallout from adding more proper generics support, follow ups to be done in smaller PRs, this big one has been going for far too long. Going to squash all that and get back into small PRs mode; the fallout of the generics was kinda huge here. |
ktoso
marked this pull request as ready for review
November 12, 2025 10:32
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.
This reworks wrap-java on some real usage feedback and use-cases.
We now handle generics better:
This caused quite some fallout that needed to be addressed, and is still incomplete; e.g. #436