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
[SR-11382] 5.1: clang importer sees things differently to 5.0 when it comes to forward declared structs #53783
Comments
I don't think there was any change here, so thanks for reporting! @swift-ci create |
Ugh, this is the same problem of BoringSSL and OpenSSL have different definitions for the same types, which means we're in unsupported-land. Swift 5.0 was getting the definition of |
(I don't know what changed. It might have been something in Clang too. The last time we discussed this was SR-11125.) |
@jrose shouldn’t that be covered by NIOSSL now using @implementationOnly import CNIOBoringSSL ? |
But in any case this should be fixed by APNSwift by not using the forward declared type. |
Oh, I didn't realize there'd been a NIO release using implementationOnly yet. That explains it, then: Swift 5.0 doesn't have implementationOnly, and so it's seeing both of them because NIOSSL is written to fall back to a regular import. |
@belkadan ooh yes, of course, totally forgot that I made this conditional. Thank you! |
@belkadan can we close this then? |
Sounds good. We know what happened and consider it acceptable, even desirable, breakage. |
None of the resolutions here really match, oh well. |
Additional Detail from JIRA
md5: abea5a201d771fd6cf25cbde61e6509b
relates to:
Issue Description:
The APNSwift project recently received an issue where compilation on Linux would no longer work with Swift 5.1 builds.
BIGNUM
seems to be a typedef of the forward declaredstruct bignum_st
:So I'm actually not too surprised that
BIGNUM
is undefined in Swift because I'd have expected it to be imported asOpaquePointer
(because forward declared).However, this seems to be a change from Swift 5.0 and I'm not sure this was intended.
Here are two docker commands that are doing the exact same thing, starting from a fresh Ubuntu 18.04. The only difference is the Swift package that they download:
For Swift 5.0.2:
for swift-5.1-DEVELOPMENT-SNAPSHOT-2019-08-26-a
The text was updated successfully, but these errors were encountered: