Erase view types at every list/component boundary, not just leaves
Deploy / deploy (push) Failing after 27s
Deploy / deploy (push) Failing after 27s
Release builds were hitting rustc's recursion limit compiling the hydrate target: impl IntoView doesn't erase a component's concrete type within the same crate, so calling a component (or a <For>/<Show> children closure) without wrapping the result in .into_any() lets the caller's own type keep growing to include everything nested inside it. AlternativeCard's requirement fields already did this correctly at their own leaves; QuestionView's <For alternatives> call into AlternativeCard, and AlternativeCard's own <For features> closure, plus ResourceValue/AnswerRow's nested <For>s, didn't - so the depth compounded across all of them. Verified with a real `cargo leptos build --release` (was previously untested - only dev builds had been run against this code).
This commit is contained in:
@@ -168,6 +168,7 @@ fn QuestionView(
|
||||
parent_hash=parent_hash.clone()
|
||||
/>
|
||||
}
|
||||
.into_any()
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
@@ -495,6 +496,7 @@ fn AlternativeCard(
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
.into_any()
|
||||
}
|
||||
}
|
||||
/>
|
||||
@@ -604,6 +606,7 @@ fn ResourceValue(
|
||||
answer=answer
|
||||
/>
|
||||
}
|
||||
.into_any()
|
||||
}
|
||||
}
|
||||
/>
|
||||
@@ -655,6 +658,7 @@ fn AnswerRow(
|
||||
<span class="answer-field-value">{text}</span>
|
||||
</div>
|
||||
}
|
||||
.into_any()
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
@@ -698,6 +702,7 @@ fn AnswerRow(
|
||||
{t.label.clone()}
|
||||
</button>
|
||||
}
|
||||
.into_any()
|
||||
}
|
||||
}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user