-
Notifications
You must be signed in to change notification settings - Fork 206
Attempt to diagnose arguments to -sdk
that point to unsupported SDKs
#606
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
Conversation
@swift-ci please test |
} else if targetTriple != nil, | ||
isSDKTooOld(sdkPath: path, target: targetTriple!) { |
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.
} else if targetTriple != nil, | |
isSDKTooOld(sdkPath: path, target: targetTriple!) { | |
} else if let targetTriple = targetTriple, | |
isSDKTooOld(sdkPath: path, target: targetTriple) { |
Don't have to force unwrap here if you use if let
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.
This code looks a bit different now, but thank you for taking a look.
Can we use the |
Oh, I hadn't realized we already had this implemented. Great, I'll look into that. |
3465185
to
9d94fb2
Compare
@nkcsgexi, I changed the approach to use the |
@swift-ci please test |
"VersionMap": { | ||
"macOS_iOSMac": {}, | ||
"iOSMac_macOS": {} | ||
}, |
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.
Thanks! I think we shouldn't need VersionMap
in non-macosx SDKs.
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.
Good catch, thanks. 👍🏼
Resolves rdar://70215624
@swift-ci please test |
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.
LGTM!
} else if sdkInfo.canonicalName.hasPrefix("iphoneos") || | ||
sdkInfo.canonicalName.hasPrefix("appletvos") { | ||
return sdkVersion < Version(13, 0, 0) | ||
} else if sdkInfo.canonicalName.hasPrefix("watchos") { |
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.
Sorry about missing this. Do we need to handle simulator SDKs here?
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.
Ah, yes, that's a good catch.
I thought this would work as is because it is a prefix, but it turns out that it won't. The os
part of the prefix is not present for the simulator platforms so we need to pattern match prefixes: appletv
, watch
, iphone
, without the os
to also catch this for the simulator. I'll create another PR.
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.
Thanks! Using a more concise prefix will just work.
Resolves rdar://70215624