ReactiveX / RxSwift

Reactive Programming in Swift
MIT License
24.31k stars 4.17k forks source link

xcodebuild archive fails for RxCocoa using SPM #2540

Open hungrxyz opened 12 months ago

hungrxyz commented 12 months ago

Short description of the issue:

Archiving a framework which is using RxCocoa as a Swift package dependency fails using xcodebuild.

Expected outcome:

Archive succeeds.

What actually happens:

Here's my command to archive the framework:

xcodebuild archive \
    -project Project.xcodeproj \
    -scheme Scheme \
    -destination "generic/platform=iOS" \
    -configuration Release \
    -archivePath "archives/Release-iOS" \
    SKIP_INSTALL=NO \
    BUILD_LIBRARY_FOR_DISTRIBUTION=YES \

And here's the command line output:

ARCHIVE FAILED

The following build commands failed: SwiftVerifyEmittedModuleInterface normal arm64 Verifying\ emitted\ module\ interface\ RxCocoa.private.swiftinterface /Users/.../DerivedData/Project-ericldteywlbdydxfxsgvkaxpvdj/Build/Intermediates.noindex/ArchiveIntermediates/Project/IntermediateBuildFilesPath/RxSwift.build/Release-iphoneos/RxCocoa.build/Objects-normal/arm64/RxCocoa.private.swiftinterface (in target 'RxCocoa' from project 'RxSwift') SwiftVerifyEmittedModuleInterface normal arm64 Verifying\ emitted\ module\ interface\ RxCocoa.swiftinterface /Users/.../DerivedData/Project-ericldteywlbdydxfxsgvkaxpvdj/Build/Intermediates.noindex/ArchiveIntermediates/Project/IntermediateBuildFilesPath/RxSwift.build/Release-iphoneos/RxCocoa.build/Objects-normal/arm64/RxCocoa.swiftinterface (in target 'RxCocoa' from project 'RxSwift') (2 failures)

RxSwift/RxCocoa/RxBlocking/RxTest version/commit

6.6.0

Platform/Environment

How easy is to reproduce? (chances of successful reproduce after running the self contained code)

Xcode version:

Xcode 14.3.1

Installation method:

I have multiple versions of Xcode installed: (so we can know if this is a potential cause of your issue)

Level of RxSwift knowledge: (this is so we can understand your level of knowledge and formulate the response in an appropriate manner)

lexuanquynh commented 7 months ago

try it:

xcodebuild archive \
    -project Project.xcodeproj \
    -scheme Scheme \
    -destination "generic/platform=iOS" \
    -configuration Release \
    -archivePath "archives/Release-iOS" \
    SKIP_INSTALL=NO \
    BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
OTHER_SWIFT_FLAGS="-no-verify-emitted-module-interface"
hungrxyz commented 7 months ago

try it:

xcodebuild archive \
    -project Project.xcodeproj \
    -scheme Scheme \
    -destination "generic/platform=iOS" \
    -configuration Release \
    -archivePath "archives/Release-iOS" \
    SKIP_INSTALL=NO \
    BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
OTHER_SWIFT_FLAGS="-no-verify-emitted-module-interface"

I think I tried that already and it didn't help but I'll try again to make sure and report back this week hopefully.

lexuanquynh commented 7 months ago

I'm also not sure if it works well. Maybe it will generate another error.

freak4pc commented 4 months ago

Please provide a reproducible project to test, and also try the latest release :) Thanks.