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

Backport: Switch to canImport instead of os conditions (#184) #192

Merged
merged 1 commit into from
Aug 3, 2023

Conversation

Lukasa
Copy link
Collaborator

@Lukasa Lukasa commented Aug 3, 2023

This is a backport of #184 to the 2.x release series.

* Rework canImport to just defines with platform conditions

* Soundness and make

---------

Co-authored-by: Cory Benfield <lukasa@apple.com>
(cherry picked from commit 9c1b699)
@Lukasa Lukasa added the patch-version-bump-only For PRs that when merged will only cause a bump of the patch version, ie. 1.0.x -> 1.0.(x+1) label Aug 3, 2023
Copy link
Contributor

@simonjbeaumont simonjbeaumont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there are files in this branch that aren't covered by the cherry-pick, which might need some of the same treatment in a followup PR?

git ls-files "**/*.swift" -z | xargs -0 grep "#if" | grep os
Sources/Crypto/Key Agreement/DH.swift:        #if os(iOS) && (arch(arm) || arch(i386))
Sources/Crypto/Message Authentication Codes/HMAC/HMAC.swift:        #if os(iOS) && (arch(arm) || arch(i386))
Sources/Crypto/Signatures/ECDSA.swift:            #if os(iOS) && (arch(arm) || arch(i386))
Sources/Crypto/Signatures/ECDSA.swift:            #if os(iOS) && (arch(arm) || arch(i386))
Sources/Crypto/Signatures/ECDSA.swift:            #if os(iOS) && (arch(arm) || arch(i386))
Sources/Crypto/Signatures/ECDSA.swift:            #if os(iOS) && (arch(arm) || arch(i386))
Sources/Crypto/Signatures/ECDSA.swift:            #if os(iOS) && (arch(arm) || arch(i386))
Sources/Crypto/Signatures/ECDSA.swift:            #if os(iOS) && (arch(arm) || arch(i386))
Tests/CryptoTests/Encodings/DERTests.swift:        #if canImport(Darwin) || os(Linux) || os(Android) || os(Windows)

@Lukasa Lukasa merged commit b71d0c1 into apple:swift-crypto-2.6.X Aug 3, 2023
@Lukasa Lukasa deleted the cb-backport-184 branch August 3, 2023 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch-version-bump-only For PRs that when merged will only cause a bump of the patch version, ie. 1.0.x -> 1.0.(x+1)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants