Expected behavior
My framework project uses Hedera-Protobuf-Swift which uses grpc-swift and it has a dependencies with swift-nio libraries including swift-nio-transport-services.
I don't use NIOCore in my code and there is no problem.
It is ok when I build and run on xcode and it should be successful with xcodebuild command.
Actual behavior
xcodebuild command build fails with error log which ends with following lines.
...
swift-nio-transport-services.build/Release-iphoneos/NIOTransportServices.build/Objects-normal/armv7/TCPOptions+SocketChannelOption.bc
<unknown>:0: error: module map file '/Users/chris/Library/Developer/Xcode/DerivedData/myproject-exsbzxdqjxcopweabsmmudoygaip/SourcePackages/checkouts/swift-nio-transport-services/build/GeneratedModuleMaps-iphoneos/CNIODarwin.modulemap' not found
<unknown>:0: error: module map file '/Users/chris/Library/Developer/Xcode/DerivedData/myproject-exsbzxdqjxcopweabsmmudoygaip/SourcePackages/checkouts/swift-nio-transport-services/build/GeneratedModuleMaps-iphoneos/CNIOLinux.modulemap' not found
<unknown>:0: error: module map file '/Users/chris/Library/Developer/Xcode/DerivedData/myproject-exsbzxdqjxcopweabsmmudoygaip/SourcePackages/checkouts/swift-nio-transport-services/build/GeneratedModuleMaps-iphoneos/CNIOAtomics.modulemap' not found
/Users/chris/Library/Developer/Xcode/DerivedData/myproject-exsbzxdqjxcopweabsmmudoygaip/SourcePackages/checkouts/swift-nio-transport-services/Sources/NIOTransportServices/NIOFilterEmptyWritesHandler.swift:15:8: error: no such module 'NIOCore'
import NIOCore
^
** BUILD FAILED **
The following build commands failed:
CompileSwift normal arm64 (in target 'NIOTransportServices' from project 'swift-nio-transport-services')
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'NIOTransportServices' from project 'swift-nio-transport-services')
CompileSwift normal armv7 (in target 'NIOTransportServices' from project 'swift-nio-transport-services')
CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler (in target 'NIOTransportServices' from project 'swift-nio-transport-services')
(4 failures)
Steps to reproduce
- My project uses Package Manager and it has hedera-protobuf-swift library which has a dependencies on grpc-swift and it seems that it uses swift-nio libraries.
- In the terminal, I run following command.
xcodebuild -target myproject BITCODE_GENERATION_MODE=bitcode OTHER_CFLAGS="-fembed-bitcode" ONLY_ACTIVE_ARCH=NO -configuration Release -sdk iphoneos BUILD_DIR=./build clean build
If possible, minimal yet complete reproducer code (or URL to code)
[anything to help us reproducing the issue]
SwiftNIO version/commit hash
grpc-swift 1.6.1
swift-nio 2.36.0
swift-nio-extras 1.10.2
swift-nio-http2 1.19.1
swift-nio-ssl 2.17.1
swift-nio-transport-services 1.11.3
[the SwiftNIO tag/commit hash]
Swift & OS version (output of swift --version && uname -a)
swift-driver version: 1.26.21 Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)
Target: x86_64-apple-macosx11.0
Darwin Chriss-MacBook-Pro.local 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:21 PDT 2021; root:xnu-7195.141.6~3/RELEASE_X86_64 x86_64
XCode Version 13.2.1 (13C100)
Expected behavior
My framework project uses Hedera-Protobuf-Swift which uses grpc-swift and it has a dependencies with swift-nio libraries including swift-nio-transport-services.
I don't use NIOCore in my code and there is no problem.
It is ok when I build and run on xcode and it should be successful with xcodebuild command.
Actual behavior
xcodebuild command build fails with error log which ends with following lines.
Steps to reproduce
If possible, minimal yet complete reproducer code (or URL to code)
[anything to help us reproducing the issue]
SwiftNIO version/commit hash
grpc-swift 1.6.1
swift-nio 2.36.0
swift-nio-extras 1.10.2
swift-nio-http2 1.19.1
swift-nio-ssl 2.17.1
swift-nio-transport-services 1.11.3
[the SwiftNIO tag/commit hash]
Swift & OS version (output of
swift --version && uname -a)swift-driver version: 1.26.21 Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)
Target: x86_64-apple-macosx11.0
Darwin Chriss-MacBook-Pro.local 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:21 PDT 2021; root:xnu-7195.141.6~3/RELEASE_X86_64 x86_64
XCode Version 13.2.1 (13C100)