-
Notifications
You must be signed in to change notification settings - Fork 50
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
Don't require xcodegen settings preset files. All configuration shoul… #84
Conversation
6f76738
to
88b10b6
Compare
struct XCBuildSettings: Encodable { | ||
var copts: [String] = [] | ||
var productName: First<String>? | ||
var productName: First<String>? = First("$(TARGET_NAME)") |
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.
So if we allocate this, it sets it to target name as the default? If we want to always set it to TARGET_NAME
we should just remove the variable if it isn't necessary
Sources/XCHammer/XcodeTarget.swift
Outdated
@@ -454,10 +454,13 @@ public class XcodeTarget: Hashable, Equatable { | |||
return xcTargetName + ".xctest" | |||
case .AppExtension, .XPCService, .Watch1App, .Watch2App, .Watch1Extension, .Watch2Extension, .TVAppExtension: | |||
return xcTargetName + ".appex" | |||
case .StaticLibrary: | |||
case .StaticLibrary, .Tool: |
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.
Is this related?
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.
Nope but it's correct
Sources/XCHammer/XcodeTarget.swift
Outdated
default: | ||
fatalError() | ||
print("ERR: Product type \(productType)") |
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.
Remove
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.
done!
Sources/XCHammer/XcodeTarget.swift
Outdated
return xcTargetName | ||
case .Bundle: |
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 we actually need this one? I thought bundles weren't built
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 actually hit this case
settings.productName <>= self.bundleName.map { First($0) } | ||
|
||
if settings.productName == nil { | ||
settings.productName = First(self.extractBuiltProductName()) |
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.
Would this code path ever be hit? It doesn't seem like it if you set the value in the initializer?
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.
it will now that there isn't a default value
@@ -163,6 +166,11 @@ struct XCBuildSettings: Encodable { | |||
var useHeaderMap: First<String>? = First("NO") | |||
var testTargetName: First<String>? | |||
var pythonPath: First<String>? | |||
var sdkRoot: First<String>? | |||
var targetedDeviceFamily: OrderedArray<String> = OrderedArray.empty | |||
|
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.
Minor: remove spaces?
54583d3
to
01c56c5
Compare
@@ -163,6 +166,11 @@ struct XCBuildSettings: Encodable { | |||
var useHeaderMap: First<String>? = First("NO") | |||
var testTargetName: First<String>? | |||
var pythonPath: First<String>? | |||
var sdkRoot: First<String>? | |||
var targetedDeviceFamily: OrderedArray<String> = OrderedArray.empty |
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.
What's an OrderedArray
?
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.
Ordered array is poorly named, it's basically an implementation of ordered set that conform to a few protocols used to serialize build settings. We wanted uniqueness with consistent ordering which is why this was originally written, happy to revisit
Didn't mean to accept, just meant to leave a comment. |
What's the deal with all the scheme changes and developer machine specific path changes? |
82e57f0
to
cf35e3e
Compare
…d be specified by xchammer.[yaml|yml] files - Update sample project - Make Product name fallback the target name - Add target device families and sdk root for ios, watchos, tvos, macos
cf35e3e
to
2dfaa57
Compare
@kastiglione - Filed tickets to address the scheme changes and dev machine paths |
@rahul-malik - there is a ton of errors on the CI and locally from XcodeGen
|
I added that print statement, it’s not an error |
Ah ok - can you submit a followup to remove? People might be confused because we support all of the things that are emitted as |
…d be
specified by xchammer.[yaml|yml] files