apptekstudios / ASCollectionView

A SwiftUI collection view with support for custom layouts, preloading, and more.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

archive error: “xxx-master.dia:1:1: Could not read serialized diagnostics file: Cannot Load File: Failed to open diagnostics file”

foolbear opened this issue · comments

Describe the bug
A clear and concise description of what the bug is.

I upgraded my xcode to 11.4 yesterday, now I can not archive my SwiftUI code to submit appstore.

To Reproduce
Steps to reproduce the behaviour:

Expected behaviour
A description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Xcode Version:

  • 11.4
    Swift version 5.2

Simulator, Device, Both?

  • Where is the problem occuring
  1. Apple Swift version 5.2 (swiftlang-1103.0.32.1 clang-1103.0.32.29)
  2. While emitting SIL for getter for body (at /path/UI/HomeView.swift:29:9)
  3. While silgen emitFunction SIL function "@$s14StudyCardsPlus8HomeViewV4bodyQrvg".
    for getter for body (at /path/UI/HomeView.swift:29:9)
  4. While silgen closureexpr SIL function "@$s14StudyCardsPlus8HomeViewV4bodyQrvg7SwiftUI0E0P9FoolToastE04foolJ0QryFQOyAgEE18navigationBarItems8trailingQrqd___tAeFRd__lFQOyAgEE0lM5Title_11displayModeQrAE4TextV_AE010NavigationM4ItemV0p7DisplayR0OtFQOyAgEE5sheet11isPresented9onDismiss7contentQrAE7BindingVySbG_yycSgqd__yctAeFRd__lFQOyAgEE21edgesIgnoringSafeAreayQrAE4EdgeO3SetVFQOyAgEE10background_9alignmentQrqd___AE9AlignmentVtAeFRd__lFQOyAG012ASCollectionE0E20alwaysBounceVerticalyQrSbFQOyAGA9_E13contentInsetsyQrSo12UIEdgeInsetsVFQOyA9_A9_VyAC7SectionOG_Qo__Qo__AE5ColorVQo__Qo__AC0W7ContentQrvpQOy_Qo_Qo__Qo__AC0lM8TrailingQrvpQOy_Qo_Qo__Qo_yXEfU_".
    for expression at [/path/UI/HomeView.swift:30:24 - line:74:9] RangeText="{
    ASCollectionView {
    ASCollectionViewSection
    (id: .main) {
    NavigationLink(destination: BooksView()) {
    BlockItemView(item: .itemBook, count: bookCount)
    }
    NavigationLink(destination: CardsView(book: nil)) {
    BlockItemView(item: .itemCard, count: cardCount)
    }
    NavigationLink(destination: TagsView()) {
    BlockItemView(item: .itemTag, count: tagCount)
    }
    }
    #if PLUSVERSION
    #else
    ASCollectionViewSection
    (id: .ad) {
    FoolGADBannerView(adUnitId: adUnitIdForBannerInHomeView).frame(width: sizeOfGADBanner.width, height: sizeOfGADBanner.height)
    }
    #endif
    ASCollectionViewSection
    (id: .new, data: newItems) { item, state in
    VStack(spacing: 0) {
    ListItemView(item: item) { item in self.onNew(item: item) }
    if !state.isLastInSection { Divider() }
    }
    }.sectionHeader { HStack { Text("New Item".localized).font(.headline).bold().foregroundColor(manager.userMode == .edit ? .primary : .gray).padding(); Spacer() } }
    ASCollectionViewSection
    (id: .userMode) {
    HStack {
    Text("Use mode".localized).font(.headline).bold().foregroundColor(.primary).padding()
    Spacer()
    Picker(selection: $manager.userMode, label: Text("")) {
    ForEach(UserMode.allCases) { userMode in Text("(userMode.toString())").tag(userMode) }
    }.pickerStyle(SegmentedPickerStyle()).frame(maxWidth: 180).padding()
    }
    }
    }
    .layout(layout)
    .contentInsets(UIEdgeInsets(top: 20, left: 0, bottom: 20, right: 0))
    .alwaysBounceVertical()
    .background(Color(.systemGroupedBackground))
    .edgesIgnoringSafeArea(.all)
    .sheet(isPresented: $sheetShowing) { self.sheetContent }
    .navigationBarTitle(Text("Title".localized), displayMode: .inline)
    .navigationBarItems(trailing: navigationBarTrailing)
    .foolToast()

0 swift 0x0000000109ce84ea PrintStackTraceSignalHandler(void*) + 42
1 swift 0x0000000109ce7cc0 SignalHandler(int) + 352
2 libsystem_platform.dylib 0x00007fff6c4485fd _sigtramp + 29
3 swift 0x0000000106a5f4b3 swift::ValueDecl::getEffectiveAccess() const + 1635
4 swift 0x0000000105f221c8 (anonymous namespace)::Transform::transform(swift::Lowering::ManagedValue, swift::Lowering::AbstractionPattern, swift::CanType, swift::Lowering::AbstractionPattern, swift::CanType, swift::Lowering::SGFContext) + 12680
5 swift 0x0000000105f1f028 swift::Lowering::SILGenFunction::emitOrigToSubstValue(swift::SILLocation, swift::Lowering::ManagedValue, swift::Lowering::AbstractionPattern, swift::CanType, swift::Lowering::SGFContext) + 136
6 swift 0x0000000105e9f886 swift::Lowering::Conversion::emit(swift::Lowering::SILGenFunction&, swift::SILLocation, swift::Lowering::ManagedValue, swift::Lowering::SGFContext) const + 710
7 swift 0x0000000105e4182d (anonymous namespace)::ScalarResultPlan::finish(swift::Lowering::SILGenFunction&, swift::SILLocation, swift::CanType, llvm::ArrayRefswift::Lowering::ManagedValue&) + 1021
8 swift 0x0000000105e5cc28 swift::Lowering::SILGenFunction::emitApply(std::__1::unique_ptr<swift::Lowering::ResultPlan, std::__1::default_deleteswift::Lowering::ResultPlan >&&, swift::Lowering::ArgumentScope&&, swift::SILLocation, swift::Lowering::ManagedValue, swift::SubstitutionMap, llvm::ArrayRefswift::Lowering::ManagedValue, swift::Lowering::CalleeTypeInfo const&, swift::Lowering::ApplyOptions, swift::Lowering::SGFContext) + 1784
9 swift 0x0000000105e6a7bf (anonymous namespace)::CallEmission::apply(swift::Lowering::SGFContext) + 3951
10 swift 0x0000000105e66c47 swift::Lowering::SILGenFunction::emitApplyExpr(swift::ApplyExpr*, swift::Lowering::SGFContext) + 2567
11 swift 0x0000000105e624f5 (anonymous namespace)::ArgEmitter::emit(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern) + 3701
12 swift 0x0000000105e5e3b3 (anonymous namespace)::ArgEmitter::emitSingleArg(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern) + 163
13 swift 0x0000000105e706ce (anonymous namespace)::ArgEmitter::emitPreparedArgs(swift::Lowering::PreparedArguments&&, swift::Lowering::AbstractionPattern) + 238
14 swift 0x0000000105e70549 (anonymous namespace)::CallSite::emit(swift::Lowering::SILGenFunction&, swift::Lowering::AbstractionPattern, swift::CanTypeWrapperswift::SILFunctionType, (anonymous namespace)::ParamLowering&, llvm::SmallVectorImplswift::Lowering::ManagedValue&, llvm::SmallVectorImpl<(anonymous namespace)::DelayedArgument>&, llvm::Optionalswift::ForeignErrorConvention const&, swift::ImportAsMemberStatus) && + 537
15 swift 0x0000000105e6e208 (anonymous namespace)::CallEmission::emitArgumentsForNormalApply(swift::CanTypeWrapperswift::FunctionType&, swift::Lowering::AbstractionPattern&, swift::CanTypeWrapperswift::SILFunctionType, llvm::Optionalswift::ForeignErrorConvention const&, swift::ImportAsMemberStatus, llvm::SmallVectorImplswift::Lowering::ManagedValue&, llvm::Optionalswift::SILLocation&, swift::CanTypeWrapperswift::FunctionType&) + 1032
16 swift 0x0000000105e6a6b8 (anonymous namespace)::CallEmission::apply(swift::Lowering::SGFContext) + 3688
17 swift 0x0000000105e66c47 swift::Lowering::SILGenFunction::emitApplyExpr(swift::ApplyExpr*, swift::Lowering::SGFContext) + 2567
18 swift 0x0000000105e624f5 (anonymous namespace)::ArgEmitter::emit(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern) + 3701
19 swift 0x0000000105e5e3b3 (anonymous namespace)::ArgEmitter::emitSingleArg(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern) + 163
20 swift 0x0000000105e706ce (anonymous namespace)::ArgEmitter::emitPreparedArgs(swift::Lowering::PreparedArguments&&, swift::Lowering::AbstractionPattern) + 238
21 swift 0x0000000105e70549 (anonymous namespace)::CallSite::emit(swift::Lowering::SILGenFunction&, swift::Lowering::AbstractionPattern, swift::CanTypeWrapperswift::SILFunctionType, (anonymous namespace)::ParamLowering&, llvm::SmallVectorImplswift::Lowering::ManagedValue&, llvm::SmallVectorImpl<(anonymous namespace)::DelayedArgument>&, llvm::Optionalswift::ForeignErrorConvention const&, swift::ImportAsMemberStatus) && + 537
22 swift 0x0000000105e6e208 (anonymous namespace)::CallEmission::emitArgumentsForNormalApply(swift::CanTypeWrapperswift::FunctionType&, swift::Lowering::AbstractionPattern&, swift::CanTypeWrapperswift::SILFunctionType, llvm::Optionalswift::ForeignErrorConvention const&, swift::ImportAsMemberStatus, llvm::SmallVectorImplswift::Lowering::ManagedValue&, llvm::Optionalswift::SILLocation&, swift::CanTypeWrapperswift::FunctionType&) + 1032
23 swift 0x0000000105e6a6b8 (anonymous namespace)::CallEmission::apply(swift::Lowering::SGFContext) + 3688
24 swift 0x0000000105e66c47 swift::Lowering::SILGenFunction::emitApplyExpr(swift::ApplyExpr*, swift::Lowering::SGFContext) + 2567
25 swift 0x0000000105e624f5 (anonymous namespace)::ArgEmitter::emit(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern) + 3701
26 swift 0x0000000105e5e3b3 (anonymous namespace)::ArgEmitter::emitSingleArg(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern) + 163
27 swift 0x0000000105e706ce (anonymous namespace)::ArgEmitter::emitPreparedArgs(swift::Lowering::PreparedArguments&&, swift::Lowering::AbstractionPattern) + 238
28 swift 0x0000000105e70549 (anonymous namespace)::CallSite::emit(swift::Lowering::SILGenFunction&, swift::Lowering::AbstractionPattern, swift::CanTypeWrapperswift::SILFunctionType, (anonymous namespace)::ParamLowering&, llvm::SmallVectorImplswift::Lowering::ManagedValue&, llvm::SmallVectorImpl<(anonymous namespace)::DelayedArgument>&, llvm::Optionalswift::ForeignErrorConvention const&, swift::ImportAsMemberStatus) && + 537
29 swift 0x0000000105e6e208 (anonymous namespace)::CallEmission::emitArgumentsForNormalApply(swift::CanTypeWrapperswift::FunctionType&, swift::Lowering::AbstractionPattern&, swift::CanTypeWrapperswift::SILFunctionType, llvm::Optionalswift::ForeignErrorConvention const&, swift::ImportAsMemberStatus, llvm::SmallVectorImplswift::Lowering::ManagedValue&, llvm::Optionalswift::SILLocation&, swift::CanTypeWrapperswift::FunctionType&) + 1032
30 swift 0x0000000105e6a6b8 (anonymous namespace)::CallEmission::apply(swift::Lowering::SGFContext) + 3688
31 swift 0x0000000105e66c47 swift::Lowering::SILGenFunction::emitApplyExpr(swift::ApplyExpr*, swift::Lowering::SGFContext) + 2567
32 swift 0x0000000105e624f5 (anonymous namespace)::ArgEmitter::emit(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern) + 3701
33 swift 0x0000000105e5e3b3 (anonymous namespace)::ArgEmitter::emitSingleArg(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern) + 163
34 swift 0x0000000105e706ce (anonymous namespace)::ArgEmitter::emitPreparedArgs(swift::Lowering::PreparedArguments&&, swift::Lowering::AbstractionPattern) + 238
35 swift 0x0000000105e70549 (anonymous namespace)::CallSite::emit(swift::Lowering::SILGenFunction&, swift::Lowering::AbstractionPattern, swift::CanTypeWrapperswift::SILFunctionType, (anonymous namespace)::ParamLowering&, llvm::SmallVectorImplswift::Lowering::ManagedValue&, llvm::SmallVectorImpl<(anonymous namespace)::DelayedArgument>&, llvm::Optionalswift::ForeignErrorConvention const&, swift::ImportAsMemberStatus) && + 537
36 swift 0x0000000105e6e208 (anonymous namespace)::CallEmission::emitArgumentsForNormalApply(swift::CanTypeWrapperswift::FunctionType&, swift::Lowering::AbstractionPattern&, swift::CanTypeWrapperswift::SILFunctionType, llvm::Optionalswift::ForeignErrorConvention const&, swift::ImportAsMemberStatus, llvm::SmallVectorImplswift::Lowering::ManagedValue&, llvm::Optionalswift::SILLocation&, swift::CanTypeWrapperswift::FunctionType&) + 1032
37 swift 0x0000000105e6a6b8 (anonymous namespace)::CallEmission::apply(swift::Lowering::SGFContext) + 3688
38 swift 0x0000000105e66c47 swift::Lowering::SILGenFunction::emitApplyExpr(swift::ApplyExpr*, swift::Lowering::SGFContext) + 2567
39 swift 0x0000000105e624f5 (anonymous namespace)::ArgEmitter::emit(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern) + 3701
40 swift 0x0000000105e5e3b3 (anonymous namespace)::ArgEmitter::emitSingleArg(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern) + 163
41 swift 0x0000000105e706ce (anonymous namespace)::ArgEmitter::emitPreparedArgs(swift::Lowering::PreparedArguments&&, swift::Lowering::AbstractionPattern) + 238
42 swift 0x0000000105e70549 (anonymous namespace)::CallSite::emit(swift::Lowering::SILGenFunction&, swift::Lowering::AbstractionPattern, swift::CanTypeWrapperswift::SILFunctionType, (anonymous namespace)::ParamLowering&, llvm::SmallVectorImplswift::Lowering::ManagedValue&, llvm::SmallVectorImpl<(anonymous namespace)::DelayedArgument>&, llvm::Optionalswift::ForeignErrorConvention const&, swift::ImportAsMemberStatus) && + 537
43 swift 0x0000000105e6e208 (anonymous namespace)::CallEmission::emitArgumentsForNormalApply(swift::CanTypeWrapperswift::FunctionType&, swift::Lowering::AbstractionPattern&, swift::CanTypeWrapperswift::SILFunctionType, llvm::Optionalswift::ForeignErrorConvention const&, swift::ImportAsMemberStatus, llvm::SmallVectorImplswift::Lowering::ManagedValue&, llvm::Optionalswift::SILLocation&, swift::CanTypeWrapperswift::FunctionType&) + 1032
44 swift 0x0000000105e6a6b8 (anonymous namespace)::CallEmission::apply(swift::Lowering::SGFContext) + 3688
45 swift 0x0000000105e66c47 swift::Lowering::SILGenFunction::emitApplyExpr(swift::ApplyExpr*, swift::Lowering::SGFContext) + 2567
46 swift 0x0000000105e624f5 (anonymous namespace)::ArgEmitter::emit(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern) + 3701
47 swift 0x0000000105e5e3b3 (anonymous namespace)::ArgEmitter::emitSingleArg(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern) + 163
48 swift 0x0000000105e706ce (anonymous namespace)::ArgEmitter::emitPreparedArgs(swift::Lowering::PreparedArguments&&, swift::Lowering::AbstractionPattern) + 238
49 swift 0x0000000105e70549 (anonymous namespace)::CallSite::emit(swift::Lowering::SILGenFunction&, swift::Lowering::AbstractionPattern, swift::CanTypeWrapperswift::SILFunctionType, (anonymous namespace)::ParamLowering&, llvm::SmallVectorImplswift::Lowering::ManagedValue&, llvm::SmallVectorImpl<(anonymous namespace)::DelayedArgument>&, llvm::Optionalswift::ForeignErrorConvention const&, swift::ImportAsMemberStatus) && + 537
50 swift 0x0000000105e6e208 (anonymous namespace)::CallEmission::emitArgumentsForNormalApply(swift::CanTypeWrapperswift::FunctionType&, swift::Lowering::AbstractionPattern&, swift::CanTypeWrapperswift::SILFunctionType, llvm::Optionalswift::ForeignErrorConvention const&, swift::ImportAsMemberStatus, llvm::SmallVectorImplswift::Lowering::ManagedValue&, llvm::Optionalswift::SILLocation&, swift::CanTypeWrapperswift::FunctionType&) + 1032
51 swift 0x0000000105e6a6b8 (anonymous namespace)::CallEmission::apply(swift::Lowering::SGFContext) + 3688
52 swift 0x0000000105e66c47 swift::Lowering::SILGenFunction::emitApplyExpr(swift::ApplyExpr*, swift::Lowering::SGFContext) + 2567
53 swift 0x0000000105e624f5 (anonymous namespace)::ArgEmitter::emit(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern) + 3701
54 swift 0x0000000105e5e3b3 (anonymous namespace)::ArgEmitter::emitSingleArg(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern) + 163
55 swift 0x0000000105e706ce (anonymous namespace)::ArgEmitter::emitPreparedArgs(swift::Lowering::PreparedArguments&&, swift::Lowering::AbstractionPattern) + 238
56 swift 0x0000000105e70549 (anonymous namespace)::CallSite::emit(swift::Lowering::SILGenFunction&, swift::Lowering::AbstractionPattern, swift::CanTypeWrapperswift::SILFunctionType, (anonymous namespace)::ParamLowering&, llvm::SmallVectorImplswift::Lowering::ManagedValue&, llvm::SmallVectorImpl<(anonymous namespace)::DelayedArgument>&, llvm::Optionalswift::ForeignErrorConvention const&, swift::ImportAsMemberStatus) && + 537
57 swift 0x0000000105e6e208 (anonymous namespace)::CallEmission::emitArgumentsForNormalApply(swift::CanTypeWrapperswift::FunctionType&, swift::Lowering::AbstractionPattern&, swift::CanTypeWrapperswift::SILFunctionType, llvm::Optionalswift::ForeignErrorConvention const&, swift::ImportAsMemberStatus, llvm::SmallVectorImplswift::Lowering::ManagedValue&, llvm::Optionalswift::SILLocation&, swift::CanTypeWrapperswift::FunctionType&) + 1032
58 swift 0x0000000105e6a6b8 (anonymous namespace)::CallEmission::apply(swift::Lowering::SGFContext) + 3688
59 swift 0x0000000105e66c47 swift::Lowering::SILGenFunction::emitApplyExpr(swift::ApplyExpr*, swift::Lowering::SGFContext) + 2567
60 swift 0x0000000105eb9223 swift::Lowering::SILGenFunction::emitExprInto(swift::Expr*, swift::Lowering::Initialization*, llvm::Optionalswift::SILLocation) + 131
61 swift 0x0000000105f3dc1d swift::Lowering::SILGenFunction::emitReturnExpr(swift::SILLocation, swift::Expr*) + 845
62 swift 0x0000000105f392fe swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(swift::Stmt*) + 12590
63 swift 0x0000000105f36316 swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(swift::Stmt*) + 326
64 swift 0x0000000105ee9ac0 swift::Lowering::SILGenFunction::emitClosure(swift::AbstractClosureExpr*) + 640
65 swift 0x0000000105e52f14 swift::Lowering::SILGenModule::emitClosure(swift::AbstractClosureExpr*) + 244
66 swift 0x0000000105ecd088 (anonymous namespace)::RValueEmitter::visitAbstractClosureExpr(swift::AbstractClosureExpr*, swift::Lowering::SGFContext) + 40
67 swift 0x0000000105e62afb (anonymous namespace)::ArgEmitter::emit(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern) + 5243
68 swift 0x0000000105e5e3b3 (anonymous namespace)::ArgEmitter::emitSingleArg(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern) + 163
69 swift 0x0000000105e706ce (anonymous namespace)::ArgEmitter::emitPreparedArgs(swift::Lowering::PreparedArguments&&, swift::Lowering::AbstractionPattern) + 238
70 swift 0x0000000105e70549 (anonymous namespace)::CallSite::emit(swift::Lowering::SILGenFunction&, swift::Lowering::AbstractionPattern, swift::CanTypeWrapperswift::SILFunctionType, (anonymous namespace)::ParamLowering&, llvm::SmallVectorImplswift::Lowering::ManagedValue&, llvm::SmallVectorImpl<(anonymous namespace)::DelayedArgument>&, llvm::Optionalswift::ForeignErrorConvention const&, swift::ImportAsMemberStatus) && + 537
71 swift 0x0000000105e6e208 (anonymous namespace)::CallEmission::emitArgumentsForNormalApply(swift::CanTypeWrapperswift::FunctionType&, swift::Lowering::AbstractionPattern&, swift::CanTypeWrapperswift::SILFunctionType, llvm::Optionalswift::ForeignErrorConvention const&, swift::ImportAsMemberStatus, llvm::SmallVectorImplswift::Lowering::ManagedValue&, llvm::Optionalswift::SILLocation&, swift::CanTypeWrapperswift::FunctionType&) + 1032
72 swift 0x0000000105e6a6b8 (anonymous namespace)::CallEmission::apply(swift::Lowering::SGFContext) + 3688
73 swift 0x0000000105e66c47 swift::Lowering::SILGenFunction::emitApplyExpr(swift::ApplyExpr*, swift::Lowering::SGFContext) + 2567
74 swift 0x0000000105e624f5 (anonymous namespace)::ArgEmitter::emit(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern) + 3701
75 swift 0x0000000105e5e3b3 (anonymous namespace)::ArgEmitter::emitSingleArg(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern) + 163
76 swift 0x0000000105e706ce (anonymous namespace)::ArgEmitter::emitPreparedArgs(swift::Lowering::PreparedArguments&&, swift::Lowering::AbstractionPattern) + 238
77 swift 0x0000000105e70549 (anonymous namespace)::CallSite::emit(swift::Lowering::SILGenFunction&, swift::Lowering::AbstractionPattern, swift::CanTypeWrapperswift::SILFunctionType, (anonymous namespace)::ParamLowering&, llvm::SmallVectorImplswift::Lowering::ManagedValue&, llvm::SmallVectorImpl<(anonymous namespace)::DelayedArgument>&, llvm::Optionalswift::ForeignErrorConvention const&, swift::ImportAsMemberStatus) && + 537
78 swift 0x0000000105e6e208 (anonymous namespace)::CallEmission::emitArgumentsForNormalApply(swift::CanTypeWrapperswift::FunctionType&, swift::Lowering::AbstractionPattern&, swift::CanTypeWrapperswift::SILFunctionType, llvm::Optionalswift::ForeignErrorConvention const&, swift::ImportAsMemberStatus, llvm::SmallVectorImplswift::Lowering::ManagedValue&, llvm::Optionalswift::SILLocation&, swift::CanTypeWrapperswift::FunctionType&) + 1032
79 swift 0x0000000105e6a6b8 (anonymous namespace)::CallEmission::apply(swift::Lowering::SGFContext) + 3688
80 swift 0x0000000105e66c47 swift::Lowering::SILGenFunction::emitApplyExpr(swift::ApplyExpr*, swift::Lowering::SGFContext) + 2567
81 swift 0x0000000105ebeb9a swift::ASTVisitor<(anonymous namespace)::RValueEmitter, swift::Lowering::RValue, void, void, void, void, void, swift::Lowering::SGFContext>::visit(swift::Expr*, swift::Lowering::SGFContext) + 22410
82 swift 0x0000000105eb9223 swift::Lowering::SILGenFunction::emitExprInto(swift::Expr*, swift::Lowering::Initialization*, llvm::Optionalswift::SILLocation) + 131
83 swift 0x0000000105f3dc1d swift::Lowering::SILGenFunction::emitReturnExpr(swift::SILLocation, swift::Expr*) + 845
84 swift 0x0000000105f392fe swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(swift::Stmt*) + 12590
85 swift 0x0000000105f36316 swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(swift::Stmt*) + 326
86 swift 0x0000000105ee8fdf swift::Lowering::SILGenFunction::emitFunction(swift::FuncDecl*) + 799
87 swift 0x0000000105e4f1b9 swift::Lowering::SILGenModule::emitFunction(swift::FuncDecl*) + 953
88 swift 0x0000000105f4aa18 void llvm::function_ref<void (swift::AccessorDecl*)>::callback_fn<(anonymous namespace)::SILGenType::visitAccessors(swift::AbstractStorageDecl*)::'lambda'(swift::AccessorDecl*)>(long, swift::AccessorDecl*) + 24
89 swift 0x0000000105f4a97c (anonymous namespace)::SILGenType::visitVarDecl(swift::VarDecl*) + 1948
90 swift 0x0000000105f4753b (anonymous namespace)::SILGenType::emitType() + 1163
91 swift 0x0000000105e595e2 swift::ASTVisitor<swift::Lowering::SILGenModule, void, void, void, void, void, void>::visit(swift::Decl*) + 82
92 swift 0x0000000105e587ac swift::Lowering::SILGenModule::emitSourceFile(swift::SourceFile*) + 1356
93 swift 0x0000000105e5a88a swift::SILModule::constructSIL(swift::ModuleDecl*, swift::Lowering::TypeConverter&, swift::SILOptions&, swift::FileUnit*) + 1530
94 swift 0x0000000105a3c3cb swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 55595
95 swift 0x00000001059b24d3 main + 1283
96 libdyld.dylib 0x00007fff6c24fcc9 start + 1

I remove ASCollectionView from my code, it archives fine.

Having the same problem for me when I updated to Xcode 11.4. When removed ASCollectionView references it archives fine as well.

@foolbear Sounds like a bit of a compiler bug introduced with 5.2...

Not sure if it's the issue here, but in the latest version of swift I've noticed function builders having trouble with type inference. Just looking at that little snippet of code, maybe try explicitly specifying the type for your sectionID's

eg...
ASCollectionView<YourSectionIDType>
ASSection(id: YourSectionIDType.main, ...)

Let me know if that makes any difference!

Having the same problem for me when I updated to Xcode 11.4. When removed ASCollectionView references it archives fine as well.

For me it seems to error out in the custom view modifiers like below. If I commented these out, it archives successfully.
.collectionViewAlwaysBounceVertical()
.collectionViewContentInsets(UIEdgeInsets(top: 20, left: 0, bottom: 20, right: 0))
.collectionViewScrollIndicatorsEnabled(false)

Thanks @markbryanramirez that's helpful! It seems that these SwiftUI environment modifiers are causing some sort of issue with release builds. They're very straightforward functions so there's no good reason for that :/

I might look at making them direct functions on ASCollectionView rather than utilising SwiftUI environment, as I expect the usual use case is directly configuring the collection view anyway 👍

@foolbear @markbryanramirez
I have pushed an update to the dev branch, that is my candidate for 1.5.0 (API changes... so new minor version). Please test your code with this version, it should now compile in release builds 🎉

Notably I have simplified the naming of the setting modifiers and ASCollectionView/ASTableView no longer use environment keys for their configuration. This means that the modifiers (eg. .contentInsets(CGSize...) and .separatorsEnabled(false)) must come before any SwiftUI modifiers (eg. .frame).

I'm not sure what it is about SwiftUI's .environment modifier that was causing issues with compiler optimisation, however, I feel this is a good workaround that should also increase discoverability of the available settings 👍

Thanks @apptekstudios, the recent dev branch now works for me and archives without issues. 👍😊

For future reference: I experienced this same issue with the SwiftUI .environment modifier in another package I am working on. This is definitely a compiler bug. As a workaround, making the function @inlineable seems to resolve the issues with release builds.