Post

Replies

Boosts

Views

Activity

Reply to Command SwiftCompile failed with a nonzero exit code. in xocde 16 and 15 where as it was working fine in xcode 14.3
Can you try following code DispatchQueue.main.async { let serverLangValue = ""// Server return value let switchEnum = "translate \(serverLangValue)" let text = "en" //(or any other language code) switch switchEnum { case "ABC": break case "QPR": break case "translate \(text)": break //From Xcode 16 and 15 swift compiler are file to process this case whereas older was working fine default: break } } } }
Oct ’24
Reply to Command SwiftCompile failed with a nonzero exit code. in xocde 16 and 15 where as it was working fine in xcode 14.3
I can't share full code file or project, but here is case. I had setting file in that it calls API and in response callback I have DispatchQueue.main.async block to update UI. In response I am receving on "serverLangValue" . If you copy and check following code with any project, you will get Command SwiftCompile failed with exit code (since this small pics of code it show file name but in atual profject it's not pointing file) . After commenting "case "translate (text)": " It will work fine let serverLangValue = ""// Server return value let switchEnum = "translate \(serverLangValue)" let text = "en" //(or any other language code) switch switchEnum { case "ABC": break case "QPR": break case "translate \(text)": break //From Xcode 16 and 15 swift compiler are file to process this case whereas older was working fine default: break } }
Oct ’24
Reply to Command SwiftCompile failed with a nonzero exit code. in xocde 16 and 15 where as it was working fine in xcode 14.3
Just for an update, After so many builds failed I finally got success. How do I resolve it? I removed all Swift file (storyboard and xib are fine) Build fine means a problem in Swift file Added one by one swift till error is not come, (started from utilities, model, singleton, database, ViewModel, Custom View, View) In one of file in my switch case var text = "en" (or any other language code) switch stringObject { case "ABC": break case "QPR": break case "translate \(text)": //From Xcode 16 and 15 swift compiler are file to process this case whereas older was working fine default: break }
Sep ’24
Reply to Command SwiftCompile failed with a nonzero exit code. in xocde 16 and 15 where as it was working fine in xcode 14.3
Thanks for the suggestion, Translated Report (Full Report Below) Process: swift-frontend [60506] Path: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend Identifier: swift-frontend Version: ??? Code Type: X86-64 (Native) Parent Process: XCBBuildService [49159] Responsible: Xcode [49137] User ID: 501 Date/Time: 2024-09-23 22:56:53.9089 +0530 OS Version: macOS 15.0 (24A335) Report Version: 12 Bridge OS Version: 9.0 (22P353) Anonymous UUID: 52618F1C-E345-3852-19A2-6792AF2BDC3C Sleep/Wake UUID: 9CCC2F71-394E-44C1-B77F-EAC4AE296FD2 Time Awake Since Boot: 120000 seconds Time Since Wake: 3706 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: UNKNOWN_0xD at 0x0000000000000000 Exception Codes: 0x000000000000000d, 0x0000000000000000 Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11 Terminating Process: exc handler [60506] VM Region Info: 0 is not in any region. Bytes before following region: 4415254528 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START ---> __TEXT 1072b7000-10ec10000 [121.3M] r-x/r-x SM=COW /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend Kernel Triage: VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 swift-frontend 0x1078bfd71 llvm::TinyPtrVectorswift::ModuleDecl*::push_back(swift::ModuleDecl*) + 129 1 swift-frontend 0x1089f00bc swift::constraints::ConstraintGraph::computeConnectedComponents(llvm::ArrayRefswift::TypeVariableType*) + 2876 2 swift-frontend 0x108956908 swift::constraints::SplitterStep::take(bool) + 216 3 swift-frontend 0x10894885e swift::constraints::ConstraintSystem::solveImpl(llvm::SmallVectorImplswift::constraints::Solution&) + 606 4 swift-frontend 0x10894c204 swift::constraints::ConstraintSystem::solve(llvm::SmallVectorImplswift::constraints::Solution&, swift::FreeTypeVariableBinding) + 52 5 swift-frontend 0x10894b26f swift::constraints::ConstraintSystem::solve(swift::constraints::SyntacticElementTarget&, swift::FreeTypeVariableBinding) + 1119 6 swift-frontend 0x108b74532 swift::TypeChecker::typeCheckTarget(swift::constraints::SyntacticElementTarget&, swift::optionset::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 642 7 swift-frontend 0x108b7417f swift::TypeChecker::typeCheckExpression(swift::constraints::SyntacticElementTarget&, swift::optionset::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 431 8 swift-frontend 0x108c7a9cd (anonymous namespace)::StmtChecker::typeCheckASTNode(swift::ASTNode&) + 413 9 swift-frontend 0x108c8032c swift::ASTVisitor<(anonymous namespace)::StmtChecker, void, swift::Stmt*, void, void, void, void>::visit(swift::Stmt*) + 252 10 swift-frontend 0x108c7dc1a bool (anonymous namespace)::StmtChecker::typeCheckStmtswift::BraceStmt(swift::BraceStmt*&) + 314 11 swift-frontend 0x108c80795 swift::ASTVisitor<(anonymous namespace)::StmtChecker, void, swift::Stmt*, void, void, void, void>::visit(swift::Stmt*) + 1381 12 swift-frontend 0x108c800fa bool (anonymous namespace)::StmtChecker::typeCheckStmtswift::Stmt(swift::Stmt*&) + 314 13 swift-frontend 0x108c7a8a9 (anonymous namespace)::StmtChecker::typeCheckASTNode(swift::ASTNode&) + 121 14 swift-frontend 0x108c8032c swift::ASTVisitor<(anonymous namespace)::StmtChecker, void, swift::Stmt*, void, void, void, void>::visit(swift::Stmt*) + 252 15 swift-frontend 0x108c7dc1a bool (anonymous namespace)::StmtChecker::typeCheckStmtswift::BraceStmt(swift::BraceStmt*&) + 314 16 swift-frontend 0x108c7c4ae swift::TypeCheckFunctionBodyRequest::evaluate(swift::Evaluator&, swift::AbstractFunctionDecl*) const + 1646 17 swift-frontend 0x1091ba80d swift::TypeCheckFunctionBodyRequest::OutputType swift::Evaluator::getResultUncached<swift::TypeCheckFunctionBodyRequest, swift::TypeCheckFunctionBodyRequest::OutputType swift::evaluateOrDefaultswift::TypeCheckFunctionBodyRequest(swift::Evaluator&, swift::TypeCheckFunctionBodyRequest, swift::TypeCheckFunctionBodyRequest::OutputType)::'lambda'()>(swift::TypeCheckFunctionBodyRequest const&, swift::TypeCheckFunctionBodyRequest::OutputType swift::evaluateOrDefaultswift::TypeCheckFunctionBodyRequest(swift::Evaluator&, swift::TypeCheckFunctionBodyRequest, swift::TypeCheckFunctionBodyRequest::OutputType)::'lambda'()) + 781 18 swift-frontend 0x10911fec7 swift::AbstractFunctionDecl::getTypecheckedBody() const + 151 19 swift-frontend 0x108cd4109 swift::TypeCheckSourceFileRequest::evaluate(swift::Evaluator&, swift::SourceFile*) const + 969 20 swift-frontend 0x108cdbe44 swift::TypeCheckSourceFileRequest::OutputType swift::Evaluator::getResultUncached<swift::TypeCheckSourceFileRequest, swift::TypeCheckSourceFileRequest::OutputType swift::evaluateOrDefaultswift::TypeCheckSourceFileRequest(swift::Evaluator&, swift::TypeCheckSourceFileRequest, swift::TypeCheckSourceFileRequest::OutputType)::'lambda'()>(swift::TypeCheckSourceFileRequest const&, swift::TypeCheckSourceFileRequest::OutputType swift::evaluateOrDefaultswift::TypeCheckSourceFileRequest(swift::Evaluator&, swift::TypeCheckSourceFileRequest, swift::TypeCheckSourceFileRequest::OutputType)::'lambda'()) + 772 21 swift-frontend 0x108cd3d21 swift::performTypeChecking(swift::SourceFile&) + 337 22 swift-frontend 0x107a43069 swift::CompilerInstance::performSema() + 281 23 swift-frontend 0x107619f86 performCompile(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 918 24 swift-frontend 0x107618d58 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 4392 25 swift-frontend 0x10758b6a7 swift::mainEntry(int, char const**) + 8103 26 dyld 0x7ff80c41c2cd start + 1805
Sep ’24