Description
Unfortunately, my project could not be compiled from the Xcode 15 beta 6 version. Workspace is created with a "clean architecture" approach, which means that I have four separated modules. I spent almost two weeks trying to fix it without any results. Najgorsze jest to, że nie wiem co powoduje problem. Each removal of the code duplicated the problem elsewhere.
I am very sorry that I can not provide more details. I know that Xcode is currently in beta, but the next two releases did not fix this problem.
Steps to reproduce
At first it seemed to me that the problem was the structure indicated by the compiler, but after removing it, other parts of the code were indicated. Sample code indicated in the stack dump is below.
Apple Swift version 5.9 (swiftlang-5.9.0.128.106 clang-1500.0.40.1)
Compiling with the current language version
While evaluating request TypeCheckSourceFileRequest(source_file "/Users/piotrek/Developer/project/project-swiftui-app/Data/Module/Mappers/ArticleMapper.swift")
While evaluating request TypeCheckFunctionBodyRequest(Data.(file).ArticleMapper.map(from:)@/Users/piotrek/Developer/project/project-swiftui-app/Data/Module/Mappers/ArticleMapper.swift:12:17)
While type-checking statement at [/Users/piotrek/Developer/project/project-swiftui-app/Data/Module/Mappers/ArticleMapper.swift:13:9 - line:13:169] RangeText="return LocalArticle(id: article.id, guid: article.guid, url: article.url, title: article.title, sourceName: article.sourceName, publishedAt: article.publishedAt"
While type-checking expression at [/Users/piotrek/Developer/project/project-swiftui-app/Data/Module/Mappers/ArticleMapper.swift:13:16 - line:13:169] RangeText="LocalArticle(id: article.id, guid: article.guid, url: article.url, title: article.title, sourceName: article.sourceName, publishedAt: article.publishedAt"
While type-checking-target starting at /Users/piotrek/Developer/project/project-swiftui-app/Data/Module/Mappers/ArticleMapper.swift:13:16
While reading from module 'Domain', builder version '5.9(5.9)/Apple Swift version 5.9 (swiftlang-5.9.0.128.106 clang-1500.0.40.1)', built from source, non-resilient, loaded from '/Users/piotrek/Library/Developer/Xcode/DerivedData/project-coqhpekfhaxptudlqgjqspkjnoud/Build/Products/Debug-iphonesimulator/Domain.framework/Modules/Domain.swiftmodule/arm64-apple-ios-simulator.swiftmodule'
While finishing conformance for protocol conformance to 'PersistentModel' (in module 'SwiftData') for type 'LocalArticle'
DESERIALIZATION FAILURE If any module named here was modified in the SDK, please delete the new swiftmodule files from the SDK and keep only swiftinterfaces.
module 'Domain', builder version '5.9(5.9)/Apple Swift version 5.9 (swiftlang-5.9.0.128.106 clang-1500.0.40.1)', built from source, non-resilient, loaded from '/Users/piotrek/Library/Developer/Xcode/DerivedData/project-coqhpekfhaxptudlqgjqspkjnoud/Build/Products/Debug-iphonesimulator/Domain.framework/Modules/Domain.swiftmodule/arm64-apple-ios-simulator.swiftmodule'
serialized conformances do not match requirement signature
Description Unfortunately, my project could not be compiled from the Xcode 15 beta 6 version. Workspace is created with a "clean architecture" approach, which means that I have four separated modules. I spent almost two weeks trying to fix it without any results. Najgorsze jest to, że nie wiem co powoduje problem. Each removal of the code duplicated the problem elsewhere.
I am very sorry that I can not provide more details. I know that Xcode is currently in beta, but the next two releases did not fix this problem.
Steps to reproduce At first it seemed to me that the problem was the structure indicated by the compiler, but after removing it, other parts of the code were indicated. Sample code indicated in the stack dump is below.
Stack dump
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var(unsigned int) + 0
8 swift-frontend 0x0000000103d415e8 swift::ModuleFile::fatal(llvm::Error) const + 44
9 swift-frontend 0x00000001022486c8 llvm::detail::DenseSetPair<clang::DeclContext const> llvm::DenseMapBase<llvm::SmallDenseMap<clang::DeclContext const, llvm::detail::DenseSetEmpty, 16u, llvm::DenseMapInfo<clang::DeclContext const, void>, llvm::detail::DenseSetPair<clang::DeclContext const>>, clang::DeclContext const, llvm::detail::DenseSetEmpty, llvm::DenseMapInfo<clang::DeclContext const, void>, llvm::detail::DenseSetPair<clang::DeclContext const>>::InsertIntoBucket<clang::DeclContext const const&, llvm::detail::DenseSetEmpty&>(llvm::detail::DenseSetPair<clang::DeclContext const>, clang::DeclContext const const&, llvm::detail::DenseSetEmpty&) + 0
10 swift-frontend 0x0000000103dabbe0 swift::ProtocolConformance::getWitnessDecl(swift::ValueDecl) const + 92
11 swift-frontend 0x0000000102ffbfc8 (anonymous namespace)::LookupResultBuilder::add(swift::ValueDecl, swift::DeclContext, swift::ValueDecl, swift::Type, bool) (.llvm.15206886978139527106) + 648
12 swift-frontend 0x000000010585c17c swift::TypeChecker::lookupMember(swift::DeclContext, swift::Type, swift::DeclNameRef, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 372
13 swift-frontend 0x0000000104e55f64 swift::constraints::ConstraintSystem::lookupMember(swift::Type, swift::DeclNameRef, swift::SourceLoc) + 452
14 swift-frontend 0x00000001028b06cc swift::constraints::ConstraintSystem::performMemberLookup(swift::constraints::ConstraintKind, swift::DeclNameRef, swift::Type, swift::FunctionRefKind, swift::constraints::ConstraintLocator, bool) + 3176
15 swift-frontend 0x00000001049c2aa0 swift::constraints::ConstraintSystem::simplifyMemberConstraint(swift::constraints::ConstraintKind, swift::Type, swift::DeclNameRef, swift::Type, swift::DeclContext, swift::FunctionRefKind, llvm::ArrayRef, swift::OptionSet<swift::constraints::ConstraintSystem::TypeMatchFlags, unsigned int>, swift::constraints::ConstraintLocatorBuilder) + 3940
16 swift-frontend 0x00000001028ab1cc swift::constraints::ConstraintSystem::simplifyConstructionConstraint(swift::Type, swift::FunctionType , swift::OptionSet<swift::constraints::ConstraintSystem::TypeMatchFlags, unsigned int>, swift::DeclContext, swift::FunctionRefKind, swift::constraints::ConstraintLocator) + 900
17 swift-frontend 0x00000001028cae6c swift::constraints::ConstraintSystem::simplifyApplicableFnConstraint(swift::Type, swift::Type, llvm::Optional, swift::OptionSet<swift::constraints::ConstraintSystem::TypeMatchFlags, unsigned int>, swift::constraints::ConstraintLocatorBuilder) + 3564
18 swift-frontend 0x00000001049e4714 swift::constraints::ConstraintSystem::addConstraintImpl(swift::constraints::ConstraintKind, swift::Type, swift::Type, swift::constraints::ConstraintLocatorBuilder, bool) + 1612
19 swift-frontend 0x00000001049a714c swift::constraints::ConstraintSystem::addConstraint(swift::constraints::ConstraintKind, swift::Type, swift::Type, swift::constraints::ConstraintLocatorBuilder, bool) + 80
20 swift-frontend 0x000000010286a488 (anonymous namespace)::ConstraintGenerator::visitApplyExpr(swift::ApplyExpr) + 728
21 swift-frontend 0x00000001048fd520 (anonymous namespace)::ConstraintWalker::walkToExprPost(swift::Expr) (.llvm.12930711485087754582) + 740
22 swift-frontend 0x000000010284b834 swift::constraints::ConstraintSystem::generateConstraints(swift::Expr, swift::DeclContext, bool) + 248
23 swift-frontend 0x00000001048f8228 swift::constraints::ConstraintSystem::generateConstraints(swift::constraints::SyntacticElementTarget&, swift::FreeTypeVariableBinding) + 1264
24 swift-frontend 0x0000000104a66e5c swift::constraints::ConstraintSystem::solve(swift::constraints::SyntacticElementTarget&, swift::FreeTypeVariableBinding) + 932
25 swift-frontend 0x00000001054bbe1c swift::TypeChecker::typeCheckTarget(swift::constraints::SyntacticElementTarget&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 680
26 swift-frontend 0x0000000102e636c8 swift::TypeChecker::typeCheckExpression(swift::constraints::SyntacticElementTarget&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 436
27 swift-frontend 0x00000001054bb198 swift::TypeChecker::typeCheckExpression(swift::Expr&, swift::DeclContext, swift::constraints::ContextualTypeInfo, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 84
28 swift-frontend 0x0000000105ad5918 swift::ASTVisitor<(anonymous namespace)::StmtChecker, void, swift::Stmt, void, void, void, void>::visit(swift::Stmt) (.llvm.17665565582213982471) + 6840
29 swift-frontend 0x0000000105ad3240 bool (anonymous namespace)::StmtChecker::typeCheckStmt(swift::Stmt&) + 316
30 swift-frontend 0x0000000105ab4308 (anonymous namespace)::StmtChecker::typeCheckASTNode(swift::ASTNode&) (.llvm.17665565582213982471) + 104
31 swift-frontend 0x0000000105ad3f88 swift::ASTVisitor<(anonymous namespace)::StmtChecker, void, swift::Stmt, void, void, void, void>::visit(swift::Stmt) (.llvm.17665565582213982471) + 296
32 swift-frontend 0x0000000105ab91bc bool (anonymous namespace)::StmtChecker::typeCheckStmt(swift::BraceStmt &) (.llvm.17665565582213982471) + 316
33 swift-frontend 0x0000000105ab7850 swift::TypeCheckFunctionBodyRequest::evaluate(swift::Evaluator&, swift::AbstractFunctionDecl) const + 2160
34 swift-frontend 0x000000010382c1ec swift::TypeCheckFunctionBodyRequest::OutputType swift::evaluateOrDefault(swift::Evaluator&, swift::TypeCheckFunctionBodyRequest, swift::TypeCheckFunctionBodyRequest::OutputType) + 884
35 swift-frontend 0x00000001031be0f0 swift::TypeCheckSourceFileRequest::evaluate(swift::Evaluator&, swift::SourceFile ) const + 608
36 swift-frontend 0x00000001031c62ec llvm::Expected swift::Evaluator::getResultUncached(swift::TypeCheckSourceFileRequest const&) + 664
37 swift-frontend 0x00000001031bdcc8 swift::TypeCheckSourceFileRequest::OutputType swift::evaluateOrDefault(swift::Evaluator&, swift::TypeCheckSourceFileRequest, swift::TypeCheckSourceFileRequest::OutputType) + 228
38 swift-frontend 0x0000000101e2b338 swift::CompilerInstance::performSema() + 160
39 swift-frontend 0x0000000105db53f8 performCompile(swift::CompilerInstance&, int&, swift::FrontendObserver) + 464
40 swift-frontend 0x0000000105db9454 swift::performFrontend(llvm::ArrayRef<char const>, char const, void, swift::FrontendObserver*) + 4568
41 swift-frontend 0x00000001056ff4c0 swift::mainEntry(int, char const**) + 4116
42 dyld 0x00000001a352ff28 start + 2236
LLVM_SYMBOLIZER_PATH
to point to it): 0 swift-frontend 0x000000010327f7b4 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56 1 swift-frontend 0x0000000105dfdf0c llvm::sys::RunSignalHandlers() + 112 2 swift-frontend 0x0000000101b3f720 SignalHandler(int) + 352 3 libsystem_platform.dylib 0x00000001a38b6a24 _sigtramp + 56 4 libsystem_pthread.dylib 0x00000001a3887c28 pthread_kill + 288 5 libsystem_c.dylib 0x00000001a3795ae8 abort + 180 6 swift-frontend 0x000000010149805c clang::IdentifierResolver::tryAddTopLevelDecl(clang::NamedDecl, clang::DeclarationName) + 0 7 swift-frontend 0x00000001021e760c clang::NamedDecl (anonymous namespace)::AttrReader::GetLocalDeclAs