Extract configure into its own subcommand (first of such extractions)#268
Merged
ktoso merged 5 commits intoswiftlang:mainfrom Jun 16, 2025
Merged
Conversation
76f99da to
cf0ea10
Compare
configure into its own subcommand (first of such extractions)configure into its own subcommand (first of such extractions)
cf0ea10 to
9ab784f
Compare
9ab784f to
df6e098
Compare
rintaro
reviewed
Jun 13, 2025
Comment on lines
+28
to
+34
| protocol HasCommonOptions { | ||
| var commonOptions: SwiftJava.CommonOptions { get set } | ||
| } | ||
|
|
||
| protocol HasCommonJVMOptions { | ||
| var commonJVMOptions: SwiftJava.CommonJVMOptions { get set } | ||
| } |
Member
There was a problem hiding this comment.
I don't think these protocols are actually used at this point. Any plan to utilize these?
Maybe like this?
extension HasCommonOptions {
var outputDirectory: String? { commonOptions.outputDirectory }
var inputSwift: String? { commonOptions.inputSwift }
var logLevel: Logger.Level { commonOptions.logLevel }
}
Collaborator
Author
There was a problem hiding this comment.
The primary reason was trying to rip out common functions like write... into extension where Self: HasCommonOptions but I didn't do that yet.
Your suggestion is also nice. I'll see how much use we get out of them and if none we could remove it
3b7268c to
231faca
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.
We're going towards a shape where
swift-javahas sub commands for the independent tasks it can perform:swift-java [configure|resolve|jextract|wrap-java???]and they have some common options but also some options that only make sense for some of the sub commands.This is the first steps towards this world of a more cleaned-up swift-java command line tool.