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
Support custom platforms in conditionals #6794
Conversation
In #3742, support for custom platforms was added and I think everyone understood it as supporting custom deployment targets, but it actually also added API for custom platform conditionals. Those never actually worked, though, because any platform that the platform registry doesn't know about was dropped when going from `TargetDescription` to `Target`. This fixes it and adds a unit test. See also RevenueCat/purchases-ios#2998 rdar://113709387
@swift-ci please smoke test |
How are these platform names applied when evaluating a condition? Could someone use it to match against an arbitrary target triple? If so, which triple component does it match against? |
It's up to the build system to apply them, SwiftPM's build system doesn't do anything with custom conditions, I think (as in, they should always be false). |
…sion` Fixes #2998. This is now fixed in SPM: apple/swift-package-manager#6794, but we need a workaround for now. Since `.custom` doesn't work properly, this splits `Package.swift` based on Xcode version.
…3005) Fixes #2998. See #2989 for why this is needed in the first place. This is now fixed in SPM: apple/swift-package-manager#6794, but we need a workaround for now. Since `.custom` doesn't work properly (it gets evaluated in Xcode even outside of that platform), this splits `Package.swift` based on Xcode version. Thanks @neonichu for helping with this.
…3005) Fixes #2998. See #2989 for why this is needed in the first place. This is now fixed in SPM: apple/swift-package-manager#6794, but we need a workaround for now. Since `.custom` doesn't work properly (it gets evaluated in Xcode even outside of that platform), this splits `Package.swift` based on Xcode version. Thanks @neonichu for helping with this.
In #3742, support for custom platforms was added and I think everyone understood it as supporting custom deployment targets, but it actually also added API for custom platform conditionals. Those never actually worked, though, because any platform that the platform registry doesn't know about was dropped when going from
TargetDescription
toTarget
. This fixes it and adds a unit test.See also RevenueCat/purchases-ios#2998
rdar://113709387