spotify / XCRemoteCache

Other
830 stars 53 forks source link

Unexpected error in driver invocation: invalid driver name: xcswiftc #47

Closed imWildCat closed 2 years ago

imWildCat commented 2 years ago

We have a binary target which prevents our integration of XCRemoteCache. While running it on my laptop, it shows:

SwiftDriver [A_Binary_Target] normal x86_64 com.apple.xcode.tools.swift.compiler (in target '[A_Binary_Target]' from project '[OurProjectName]')
    cd /Users/[username]/workspace/client-cocoa/app-ios
    export DEVELOPER_DIR\=/Applications/Xcode.app/Contents/Developer
    export SDKROOT\=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk
    builtin-SwiftDriver -o /Users/[username]/Library/Developer/Xcode/DerivedData/[OurProjectName]-etgvdtqrygyrkpfhhoweigaxrhgb/Build/Intermediates.noindex/[OurProjectName].build/Debug-iphonesimulator/[A_Binary_Target].build/Objects-normal/x86_64/[A_Binary_Target]\ Swift\ Driver\ Planning\ Finished -- /Users/[username]/workspace/client-cocoa/app-ios/xcremotecache/xcswiftc -incremental -module-name [A_Binary_Target] -Onone -enable-batch-mode -enforce-exclusivity\=checked @/Users/[username]/Library/Developer/Xcode/DerivedData/[OurProjectName]-etgvdtqrygyrkpfhhoweigaxrhgb/Build/Intermediates.noindex/[OurProjectName].build/Debug-iphonesimulator/[A_Binary_Target].build/Objects-normal/x86_64/[A_Binary_Target].SwiftFileList -DDEBUG -Xfrontend -warn-long-expression-type-checking\=500 -Xfrontend -warn-long-function-bodies\=500 -Xfrontend -debug-time-function-bodies -enable-experimental-concise-pound-file  -debug-prefix-map /Users/[username]/workspace/client-cocoa/app-ios\=/xxxxxxxxxx -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk -target x86_64-apple-ios14.0-simulator -g -module-cache-path /Users/[username]/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -Xfrontend -serialize-debugging-options -application-extension -profile-coverage-mapping -profile-generate -enable-testing -index-store-path /Users/[username]/Library/Developer/Xcode/DerivedData/[OurProjectName]-etgvdtqrygyrkpfhhoweigaxrhgb/Index/DataStore -swift-version 5 -I /Users/[username]/Library/Developer/Xcode/DerivedData/[OurProjectName]-etgvdtqrygyrkpfhhoweigaxrhgb/Build/Products/Debug-iphonesimulator -F /Users/[username]/Library/Developer/Xcode/DerivedData/[OurProjectName]-etgvdtqrygyrkpfhhoweigaxrhgb/Build/Products/Debug-iphonesimulator -F /Users/[username]/workspace/client-cocoa/app-ios/vendor/[A_Binary_Target] -F vendor/[A_Binary_Target] -parse-as-library -c -j16 -output-file-map /Users/[username]/Library/Developer/Xcode/DerivedData/[OurProjectName]-etgvdtqrygyrkpfhhoweigaxrhgb/Build/Intermediates.noindex/[OurProjectName].build/Debug-iphonesimulator/[A_Binary_Target].build/Objects-normal/x86_64/[A_Binary_Target]-OutputFileMap.json -save-temps -no-color-diagnostics -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/[username]/Library/Developer/Xcode/DerivedData/[OurProjectName]-etgvdtqrygyrkpfhhoweigaxrhgb/Build/Intermediates.noindex/[OurProjectName].build/Debug-iphonesimulator/[A_Binary_Target].build/Objects-normal/x86_64/[A_Binary_Target].swiftmodule -Xcc -I/Users/[username]/Library/Developer/Xcode/DerivedData/[OurProjectName]-etgvdtqrygyrkpfhhoweigaxrhgb/Build/Intermediates.noindex/[OurProjectName].build/Debug-iphonesimulator/[A_Binary_Target].build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/[username]/Library/Developer/Xcode/DerivedData/[OurProjectName]-etgvdtqrygyrkpfhhoweigaxrhgb/Build/Intermediates.noindex/[OurProjectName].build/Debug-iphonesimulator/[A_Binary_Target].build/[A_Binary_Target]-generated-files.hmap -Xcc -I/Users/[username]/Library/Developer/Xcode/DerivedData/[OurProjectName]-etgvdtqrygyrkpfhhoweigaxrhgb/Build/Intermediates.noindex/[OurProjectName].build/Debug-iphonesimulator/[A_Binary_Target].build/[A_Binary_Target]-own-target-headers.hmap -Xcc -I/Users/[username]/Library/Developer/Xcode/DerivedData/[OurProjectName]-etgvdtqrygyrkpfhhoweigaxrhgb/Build/Intermediates.noindex/[OurProjectName].build/Debug-iphonesimulator/[A_Binary_Target].build/[A_Binary_Target]-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/[username]/Library/Developer/Xcode/DerivedData/[OurProjectName]-etgvdtqrygyrkpfhhoweigaxrhgb/Build/Intermediates.noindex/[OurProjectName].build/Debug-iphonesimulator/[A_Binary_Target].build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/[username]/Library/Developer/Xcode/DerivedData/[OurProjectName]-etgvdtqrygyrkpfhhoweigaxrhgb/Build/Intermediates.noindex/[OurProjectName].build/Debug-iphonesimulator/[A_Binary_Target].build/[A_Binary_Target]-project-headers.hmap -Xcc -I/Users/[username]/Library/Developer/Xcode/DerivedData/[OurProjectName]-etgvdtqrygyrkpfhhoweigaxrhgb/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/[username]/Library/Developer/Xcode/DerivedData/[OurProjectName]-etgvdtqrygyrkpfhhoweigaxrhgb/Build/Intermediates.noindex/[OurProjectName].build/Debug-iphonesimulator/[A_Binary_Target].build/DerivedSources-normal/x86_64 -Xcc -I/Users/[username]/Library/Developer/Xcode/DerivedData/[OurProjectName]-etgvdtqrygyrkpfhhoweigaxrhgb/Build/Intermediates.noindex/[OurProjectName].build/Debug-iphonesimulator/[A_Binary_Target].build/DerivedSources/x86_64 -Xcc -I/Users/[username]/Library/Developer/Xcode/DerivedData/[OurProjectName]-etgvdtqrygyrkpfhhoweigaxrhgb/Build/Intermediates.noindex/[OurProjectName].build/Debug-iphonesimulator/[A_Binary_Target].build/DerivedSources -Xcc -DDEBUG\=1 -emit-objc-header -emit-objc-header-path /Users/[username]/Library/Developer/Xcode/DerivedData/[OurProjectName]-etgvdtqrygyrkpfhhoweigaxrhgb/Build/Intermediates.noindex/[OurProjectName].build/Debug-iphonesimulator/[A_Binary_Target].build/Objects-normal/x86_64/[A_Binary_Target]-Swift.h -Xcc -working-directory/Users/[username]/workspace/client-cocoa/app-ios -experimental-emit-module-separately

error: Unexpected error in driver invocation: invalid driver name: xcswiftc (in target '[A_Binary_Target]' from project '[Our Project Name]')

Any suggestions on this?

polac24 commented 2 years ago

Seems you have enabled Xcode 13.2 experimental EnableSwiftBuildSystemIntegration.

Depending what you want to achive, you can either:

imWildCat commented 2 years ago

Thanks a lot, @polac24 !

That's exactly the reason!

Really appreciate you help! 🙏