Skip to content

Build fails when BUILD_LIBRARY_FOR_DISTRIBUTION is set to YES #213

@kiroskirin

Description

@kiroskirin

Describe the bug

EmitSwiftModule normal arm64 (in target 'Logging' from project 'swift-log')
    
/Users/.../SourcePackages/checkouts/swift-log/Sources/Logging/Logging.swift:59:9: error: initializer for class 'Logger.Storage' is '@inlinable' and must delegate to another initializer
        init(label: String, handler: any LogHandler) {
        ^

SwiftEmitModule normal arm64 Emitting\ module\ for\ DataCompression (in target 'DataCompression' from project 'opentelemetry-swift')
Command SwiftEmitModule failed with a nonzero exit code

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"

Expected behavior

The build should succeed when BUILD_LIBRARY_FOR_DISTRIBUTION is set to YES

Swift Liveness Version

2.51.0

Xcode version

16.4

Relevant log output

<details>
<summary>Log Messages</summary>


/Users/.../SourcePackages/checkouts/swift-log/Sources/Logging/Logging.swift:59:9: error: initializer for class 'Logger.Storage' is '@inlinable' and must delegate to another initializer
        init(label: String, handler: any LogHandler) {
        ^

</details>

Is this a regression?

Yes

Regression additional context

No response

OS Version

swift-driver version: 1.115.1 Apple Swift version 6.0.3 (swiftlang-6.0.3.1.10 clang-1600.0.30.1) Target: arm64-apple-macosx14.0 Darwin 23.6.0 Darwin Kernel Version 23.6.0: Mon Aug 11 21:19:48 PDT 2025; root:xnu-10063.141.1.706.13~1/RELEASE_ARM64_T6000 arm64

Device

iPhone 16

Specific to simulators

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions