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

Build fails when BUILD_LIBRARY_FOR_DISTRIBUTION is set to YES #314

Open
manuelmayer-dev opened this issue Jun 28, 2024 · 3 comments
Open

Comments

@manuelmayer-dev
Copy link

Expected behavior

The build should succeed when BUILD_LIBRARY_FOR_DISTRIBUTION is set to YES

Actual behavior

The build failes with following error:

/Users/.../Library/Developer/Xcode/DerivedData/...-bpquduvhbvfnlzdecjxlvelyutun/SourcePackages/checkouts/swift-log/Sources/Logging/Logging.swift:56:9: error: initializer for class 'Logger.Storage' is '@inlinable' and must delegate to another initializer
        init(label: String, handler: any LogHandler) {
        ^
** ARCHIVE FAILED **

If BUILD_LIBRARY_FOR_DISTRIBUTION is set to NO, it compiles without problems.

Steps to reproduce

  1. Create a new framework and add SwiftLog dependency
  2. Build with xcodebuild: xcodebuild archive -quiet -scheme framework -configuration Release SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES -archivePath "./framework-iphoneos" -destination "generic/platform=iOS"

SwiftLog version/commit hash

1.6.1

Swift & OS version (output of swift --version && uname -a)

swift-driver version: 1.90.11.1 Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
Target: arm64-apple-macosx14.0
Darwin MBP-MMayer.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000 arm64

@zeeshanmakeen
Copy link

Any fix for this. I am facing the similar issue

@FranzBusch
Copy link
Member

This package, like many other packages, doesn't support building in library evolution mode. The package is intended to be consumed from source. If you want to use this package in a framework that you are distributing you need to use private import Logging or @_implementationOnly import Logging to hide the dependency.

@TheNorthEestern
Copy link

Would one have any recourse as a consumer of a package that depends on this? I'm experiencing the same issue, but I'm not the author of the package that depends on swift-log

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

No branches or pull requests

4 participants