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

Update to swift-crypto 2.4.1 #6431

Merged
merged 2 commits into from
Apr 17, 2023
Merged

Conversation

yim-lee
Copy link
Contributor

@yim-lee yim-lee commented Apr 13, 2023

Motivation:
swift-crypto 2.4.1 includes updates in BoringSSL that cause Unsafe*Pointer<EVP_PKEY> become OpaquePointer and without this code adjustment SwiftPM fails to build with error: cannot find type 'EVP_PKEY' in scope.

Modifications:

  • Update dependency from 2.4.0 to 2.4.1
  • Replace Unsafe*Pointer<EVP_PKEY> with OpaquePointer.

Motivation:
swift-crypto 2.4.1 includes updates in BoringSSL that cause `Unsafe*Pointer<EVP_PKEY>` become `OpaquePointer` and without this code adjustment SwiftPM fails to build with `error: cannot find type 'EVP_PKEY' in scope`.

Modifications:
- Update dependency from 2.4.0 to 2.4.1
- Replace `Unsafe*Pointer<EVP_PKEY>` with `OpaquePointer`.
@yim-lee
Copy link
Contributor Author

yim-lee commented Apr 13, 2023

This requires changes to update-checkout.

@yim-lee
Copy link
Contributor Author

yim-lee commented Apr 13, 2023

swiftlang/swift#65157
@swift-ci please smoke test

@MaxDesiatov
Copy link
Contributor

Ready to merge? This would unblock a couple of other pull requests.

@yim-lee
Copy link
Contributor Author

yim-lee commented Apr 14, 2023

Ready to merge? This would unblock a couple of other pull requests.

Need @shahmishal to merge the update-checkout changes, otherwise this patch would break other CI.

@neonichu
Copy link
Contributor

BTW, what will happen in swift-crypto 2.4.2? Is this considered a bug that'll get fixed (which implies we should use exact still) or will it stay this way?

@yim-lee
Copy link
Contributor Author

yim-lee commented Apr 14, 2023

Is this considered a bug that'll get fixed

No, it's not a bug. It is a part of BoringSSL updates that this version of swift-crypto took in, and will stay.

swift-crypto updates its vendored copy of BoringSSL once a month or so. Usually the changes are fairly minor and non-breaking, but sometimes (like this one) the updates are big and cause problems. The breaking change from swift-crypto 1.x to 2.x was similar to what happened here.

No one is supposed to depend on CCryptoBoringSSL really, but we wrote PackageCollectionsSigning using it because that was the best option at the time. Now that we have swift-certificates, the long term solution is to rewrite PackageCollectionsSigning with it and remove the dependency on CCryptoBoringSSL. I am working on that for main.

In the meantime and for 5.9, SwiftPM could as a safety measure keep using exact version (2.4.1). @neonichu @tomerd @MaxDesiatov Do we want to do that? If so I can update this and the PR for 5.9 to use exact.

@neonichu
Copy link
Contributor

Oh I see, thanks for the explanation.

I don't have a strong opinion, this seems rare enough that we can live with it. Just wanted to make sure we don't have a guaranteed breakage in the near future.

For 5.9 specifically it might make sense to pin if we are somewhat certain we won't need to update it again.

@MaxDesiatov
Copy link
Contributor

Committed conflicting PR just to unblock main in the meantime, but I resolved the conflict here, I hope you don't mind.

@MaxDesiatov
Copy link
Contributor

swiftlang/swift#65157
@swift-ci please smoke test

@MaxDesiatov
Copy link
Contributor

swiftlang/swift#65157
@swift-ci test windows

@MaxDesiatov
Copy link
Contributor

@swift-ci test windows

@MaxDesiatov
Copy link
Contributor

swiftlang/swift#65157
@swift-ci test windows

1 similar comment
@MaxDesiatov
Copy link
Contributor

swiftlang/swift#65157
@swift-ci test windows

@MaxDesiatov
Copy link
Contributor

@swift-ci test windows

@MaxDesiatov
Copy link
Contributor

Windows regression introduced in swiftlang/swift#65085

@shahmishal
Copy link
Member

@swift-ci test windows

@yim-lee
Copy link
Contributor Author

yim-lee commented Apr 15, 2023

@swift-ci please test Windows platform

@yim-lee
Copy link
Contributor Author

yim-lee commented Apr 15, 2023

swiftlang/swift#65157
@swift-ci please test Windows platform

1 similar comment
@yim-lee
Copy link
Contributor Author

yim-lee commented Apr 15, 2023

swiftlang/swift#65157
@swift-ci please test Windows platform

@MaxDesiatov
Copy link
Contributor

@swift-ci test windows

@shahmishal shahmishal merged commit 6795b62 into swiftlang:main Apr 17, 2023
@yim-lee yim-lee deleted the swift-crypto-2.4.1 branch April 17, 2023 16:28
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.

4 participants