Skip to content
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

Closed

Conversation

TheCoordinator
Copy link
Contributor

No description provided.

@@ -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
Copy link
Collaborator

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

Copy link
Contributor Author

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.

Copy link
Owner

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
Copy link
Owner

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

Copy link
Owner

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.

@yonaskolb
Copy link
Owner

Thanks for working on this @PeymanKh. I've created a new PR here addressing the comments 👍 #197

@yonaskolb yonaskolb closed this Dec 20, 2017
@TheCoordinator
Copy link
Contributor Author

Thanks @yonaskolb. Sorry, been having a hectic end of the year, was hoping to get it sorted during the holidays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants