-
Notifications
You must be signed in to change notification settings - Fork 822
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
Issue #179. Add currentXcodeVersion as an option. #182
Conversation
…aultXcodeVersion value to 0910.
@@ -47,7 +50,8 @@ public struct ProjectSpec { | |||
} | |||
} | |||
|
|||
public init(carthageBuildPath: String? = nil, createIntermediateGroups: Bool = false, bundleIdPrefix: String? = nil, settingPresets: SettingPresets = .all, developmentLanguage: String? = nil) { | |||
public init(currentXcodeVersion: String? = nil, carthageBuildPath: String? = nil, createIntermediateGroups: Bool = false, bundleIdPrefix: String? = nil, settingPresets: SettingPresets = .all, developmentLanguage: String? = nil) { | |||
self.currentXcodeVersion = currentXcodeVersion ?? Options.defaultXcodeVersion |
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.
Do you think most users of this option will know to use the XCODE_VERSION_ACTUAL
format (0910
) vs just specifying 9.1
? Should we have some logic to accept multiple formats
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 personally think that’d be a matter of documentation, most users shouldn’t even need to set this, having multiple formats could be overdoing it IMHO.
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 think I agree with @rahul-malik here. If someone defines a string with a single .
in it we could just join the parts and pad it out to the expected 4 digit number. This can happen in the XcodeGenKit
through using an extension on ProjectSpec
that also uses the default fall back as mentioned above.
@@ -20,6 +20,9 @@ public struct ProjectSpec { | |||
public var include: [String] = [] | |||
|
|||
public struct Options { | |||
fileprivate static let defaultXcodeVersion = "0910" | |||
|
|||
public var currentXcodeVersion: String |
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.
Can we name this just xcodeVersion
. You probably just went with the old name, sure why the old property was currentXcodeVersion
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.
Can we also make this an optional and move the defaultXcodeVersion
into XcodeGenKit. I'd prefer to keep any hardcoded values out of this module, as some people use it independently and it's really the generator that supports a certain version or not.
Thanks @yonaskolb. Sorry, been having a hectic end of the year, was hoping to get it sorted during the holidays. |
No description provided.