Skip to content

Xcode 16 xcodebuild command line failing #1716

@meavydev

Description

@meavydev

We use xcodebuild to produce a XCframework for iOS arm / simulator and this is failing in EmitSwiftModule.

The minimum target SDK is set to iOS 16.4.
This is nothing to do with the .proto file, as it is failing in building the source of SwiftProtobuf 1.28.1.

Sources/SwiftProtobufPluginLibrary/Descriptor.swift:1279:34: error: 'self' captured by a closure before all members were initialized

Here is the xcodebuild output in full:

EmitSwiftModule normal x86_64 (in target 'SwiftProtobufPluginLibrary' from project 'SwiftProtobuf')
    cd /Users/shawn/ios/navenioSDK/navenioSDK.xcodeproj
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -emit-module -experimental-skip-non-inlinable-function-bodies-without-types /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/Build/Intermediates.noindex/ArchiveIntermediates/navenioSDK/IntermediateBuildFilesPath/SwiftProtobuf.build/Release-iphonesimulator/SwiftProtobufPluginLibrary.build/DerivedSources/resource_bundle_accessor.swift /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/CodeGenerator.swift /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/CodeGeneratorParameter.swift /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/CodePrinter.swift /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/Descriptor+Extensions.swift /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/Descriptor.swift /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/FeatureResolver.swift /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/FieldNumbers.swift /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/GeneratorOutputs.swift /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/Google_Protobuf_Compiler_CodeGeneratorResponse+Extensions.swift /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/Google_Protobuf_Edition+Extensions.swift /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/Google_Protobuf_SourceCodeInfo+Extensions.swift /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/NamingUtils.swift /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/PluginLibEditionDefaults.swift /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/ProtoCompilerContext.swift /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/ProtoFileToModuleMappings.swift /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/ProvidesDeprecationComment.swift /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/ProvidesLocationPath.swift /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/ProvidesSourceCodeLocation.swift /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/StandardErrorOutputStream.swift /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/StringUtils.swift /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/SwiftLanguage.swift /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/SwiftProtobufInfo.swift /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/SwiftProtobufNamer.swift /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/UnicodeScalar+Extensions.swift /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/plugin.pb.swift /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/swift_protobuf_module_mappings.pb.swift -target x86_64-apple-ios12.0-simulator -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk -I /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/Build/Intermediates.noindex/ArchiveIntermediates/navenioSDK/BuildProductsPath/Release-iphonesimulator -I /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/lib -F /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/Build/Intermediates.noindex/ArchiveIntermediates/navenioSDK/BuildProductsPath/Release-iphonesimulator/PackageFrameworks -F /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/Build/Intermediates.noindex/ArchiveIntermediates/navenioSDK/BuildProductsPath/Release-iphonesimulator -F /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -F /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk/Developer/Library/Frameworks -no-color-diagnostics -enable-library-evolution -g -debug-info-format\=dwarf -dwarf-version\=4 -module-cache-path /Users/shawn/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -suppress-warnings -swift-version 5 -enforce-exclusivity\=checked -O -D SWIFT_PACKAGE -serialize-debugging-options -const-gather-protocols-file /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/Build/Intermediates.noindex/ArchiveIntermediates/navenioSDK/IntermediateBuildFilesPath/SwiftProtobuf.build/Release-iphonesimulator/SwiftProtobufPluginLibrary.build/Objects-normal/x86_64/SwiftProtobufPluginLibrary_const_extract_protocols.json -enable-experimental-feature DebugDescriptionMacro -plugin-path /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/plugins/testing -validate-clang-modules-once -clang-build-session-file /Users/shawn/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -Xcc -working-directory -Xcc /Users/shawn/ios/navenioSDK/navenioSDK.xcodeproj -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift -file-compilation-dir /Users/shawn/ios/navenioSDK/navenioSDK.xcodeproj -Xcc -ivfsstatcache -Xcc /Users/shawn/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphonesimulator18.0-22A3362-db63dc9361471f152f572502bdbfe70a.sdkstatcache -Xcc -I/Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/Build/Intermediates.noindex/ArchiveIntermediates/navenioSDK/IntermediateBuildFilesPath/SwiftProtobuf.build/Release-iphonesimulator/SwiftProtobufPluginLibrary.build/swift-overrides.hmap -Xcc -I/Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/Build/Intermediates.noindex/ArchiveIntermediates/navenioSDK/BuildProductsPath/Release-iphonesimulator/include -Xcc -I/Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/Build/Intermediates.noindex/ArchiveIntermediates/navenioSDK/IntermediateBuildFilesPath/SwiftProtobuf.build/Release-iphonesimulator/SwiftProtobufPluginLibrary.build/DerivedSources-normal/x86_64 -Xcc -I/Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/Build/Intermediates.noindex/ArchiveIntermediates/navenioSDK/IntermediateBuildFilesPath/SwiftProtobuf.build/Release-iphonesimulator/SwiftProtobufPluginLibrary.build/DerivedSources/x86_64 -Xcc -I/Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/Build/Intermediates.noindex/ArchiveIntermediates/navenioSDK/IntermediateBuildFilesPath/SwiftProtobuf.build/Release-iphonesimulator/SwiftProtobufPluginLibrary.build/DerivedSources -Xcc -DSWIFT_PACKAGE -no-verify-emitted-module-interface -module-name SwiftProtobufPluginLibrary -frontend-parseable-output -disable-clang-spi -target-sdk-version 18.0 -target-sdk-name iphonesimulator18.0 -external-plugin-path /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/swift/host/plugins\#/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/swift-plugin-server -external-plugin-path /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/local/lib/swift/host/plugins\#/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/swift-plugin-server -plugin-path /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/plugins -plugin-path /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/local/lib/swift/host/plugins -emit-module-doc-path /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/Build/Intermediates.noindex/ArchiveIntermediates/navenioSDK/IntermediateBuildFilesPath/SwiftProtobuf.build/Release-iphonesimulator/SwiftProtobufPluginLibrary.build/Objects-normal/x86_64/SwiftProtobufPluginLibrary.swiftdoc -emit-module-source-info-path /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/Build/Intermediates.noindex/ArchiveIntermediates/navenioSDK/IntermediateBuildFilesPath/SwiftProtobuf.build/Release-iphonesimulator/SwiftProtobufPluginLibrary.build/Objects-normal/x86_64/SwiftProtobufPluginLibrary.swiftsourceinfo -emit-module-interface-path /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/Build/Intermediates.noindex/ArchiveIntermediates/navenioSDK/IntermediateBuildFilesPath/SwiftProtobuf.build/Release-iphonesimulator/SwiftProtobufPluginLibrary.build/Objects-normal/x86_64/SwiftProtobufPluginLibrary.swiftinterface -emit-private-module-interface-path /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/Build/Intermediates.noindex/ArchiveIntermediates/navenioSDK/IntermediateBuildFilesPath/SwiftProtobuf.build/Release-iphonesimulator/SwiftProtobufPluginLibrary.build/Objects-normal/x86_64/SwiftProtobufPluginLibrary.private.swiftinterface -emit-objc-header-path /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/Build/Intermediates.noindex/ArchiveIntermediates/navenioSDK/IntermediateBuildFilesPath/SwiftProtobuf.build/Release-iphonesimulator/SwiftProtobufPluginLibrary.build/Objects-normal/x86_64/SwiftProtobufPluginLibrary-Swift.h -serialize-diagnostics-path /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/Build/Intermediates.noindex/ArchiveIntermediates/navenioSDK/IntermediateBuildFilesPath/SwiftProtobuf.build/Release-iphonesimulator/SwiftProtobufPluginLibrary.build/Objects-normal/x86_64/SwiftProtobufPluginLibrary-master-emit-module.dia -emit-dependencies-path /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/Build/Intermediates.noindex/ArchiveIntermediates/navenioSDK/IntermediateBuildFilesPath/SwiftProtobuf.build/Release-iphonesimulator/SwiftProtobufPluginLibrary.build/Objects-normal/x86_64/SwiftProtobufPluginLibrary-master-emit-module.d -o /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/Build/Intermediates.noindex/ArchiveIntermediates/navenioSDK/IntermediateBuildFilesPath/SwiftProtobuf.build/Release-iphonesimulator/SwiftProtobufPluginLibrary.build/Objects-normal/x86_64/SwiftProtobufPluginLibrary.swiftmodule -emit-abi-descriptor-path /Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/Build/Intermediates.noindex/ArchiveIntermediates/navenioSDK/IntermediateBuildFilesPath/SwiftProtobuf.build/Release-iphonesimulator/SwiftProtobufPluginLibrary.build/Objects-normal/x86_64/SwiftProtobufPluginLibrary.abi.json
/Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/Descriptor.swift:1279:34: error: 'self' captured by a closure before all members were initialized
    if proto.type == .message && self.features.messageEncoding == .delimited {
                                 ^
/Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/Descriptor.swift:1042:27: note: 'self.type' not initialized
  public private(set) var type: Google_Protobuf_FieldDescriptorProto.TypeEnum
                          ^
/Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/Descriptor.swift:1045:14: note: 'self.label' not initialized
  public let label: Google_Protobuf_FieldDescriptorProto.Label
             ^
/Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/Descriptor.swift:1169:14: note: 'self.oneofIndex' not initialized
  public let oneofIndex: Int32?
             ^
/Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/Descriptor.swift:1208:14: note: 'self.options' not initialized
  public var options: Google_Protobuf_FieldOptions
             ^
/Users/shawn/Library/Developer/Xcode/DerivedData/navenioSDK-enxxnytklicgbcbrnevfykghksjb/SourcePackages/checkouts/swift-protobuf/Sources/SwiftProtobufPluginLibrary/Descriptor.swift:1210:7: note: 'self.proto3Optional' not initialized
  let proto3Optional: Bool

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions