-
Notifications
You must be signed in to change notification settings - Fork 63
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
swift-certificate does not provide stable ABI #160
Comments
In general, the open source packages that you mentioned do not allow to be build with library evolution enabled since none of those packages have declared ABI stability. Making a package ABI stable is a huge undertaking and requires significant understanding of what that means for future evolvelability; hence, I am going to close this issue since we won't be making specific changes to enable build with library evolutions. However, you should be able to use |
Thanks @FranzBusch , unfortunately that what I explained in the second part of my issue. I replaced in my forked |
You shouldn't need to compile ASN1 or certificates with library evolution enabled but just your end Lastly, you have to be very careful with what you ship to your end users though. If you include an XCFramework of ASN1/certificates that means your users are not able to use the package version of them anymore. |
To be very specific, you should compile swift-certificates and swift-asn1 without |
@FranzBusch it is actually the issue I have mostly seen. Is there any public ticket for this bug and/or a fixed version for the compiler? |
After looking at this again the problem is not actually the |
Thanks @FranzBusch . That's what I also noticed, removing |
To build a distributable binary library (aka XCFramework), you should build your library with `BUILD_LIBRARY_FOR_DISTRIBUTION: https://developer.apple.com/documentation/xcode/build-settings-reference#Build-Libraries-for-Distribution
Currently
swift-certificate
does not fit to this requirement. To verify it:Clearly the main issue is the overuse of
@inlinable
- removing this compiler hint in many places fix the build.The big picture is not to only build a binary library from
swift-certificates
alone but building my own third-party binary library that depends onswift-certificate
.But it looks like building my own library with
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
requires all its dependencies to be able to build withBUILD_LIBRARY_FOR_DISTRIBUTION=YES
.An alternative seems to be the non documented option
@_implementationOnly
that might keep the benefit from@inlinable
inswift-certificate
but it does not seem to work.To demonstrate
@_implementationOnly
is not working as I would expect is to replace allimport SwiftASN1
with@_implementationOnly import SwiftASN1
inswift-certificates
. The build phase also complains about the@inlinable
use in SwiftASN1.This issue also affects:
xcodebuild build -scheme swift-crypto-Package -destination "generic/platform=macOS" BUILD_LIBRARY_FOR_DISTRIBUTION=YES
xcodebuild build -scheme swift-asn1 -destination "generic/platform=macOS" BUILD_LIBRARY_FOR_DISTRIBUTION=YES
The text was updated successfully, but these errors were encountered: