-
Notifications
You must be signed in to change notification settings - Fork 44
Extract configure
into its own subcommand (first of such extractions)
#268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract configure
into its own subcommand (first of such extractions)
#268
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
protocol HasCommonOptions { | ||
var commonOptions: SwiftJava.CommonOptions { get set } | ||
} | ||
|
||
protocol HasCommonJVMOptions { | ||
var commonJVMOptions: SwiftJava.CommonJVMOptions { get set } | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 }
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
We're going towards a shape where
swift-java
has 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.