Memo over an error boundary output: a rejection during a held change halts uncaught
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 18/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, typescript
- Ambito
- frontend
Direzione di ricerca
Start with the reproduction in the issue: createErrorBoundary wrapping a memo over a promise, then a memo over the boundary output, flushed during a held change. Compare the render-effect-reads-boundary case, which works, with the memo case, which halts. The scheduler's handling of held changes and rejected sources in the signals package is where the fix would live. Done means the second rejection is caught by the boundary, the render effect shows ERR, and nothing escapes as an uncaught error.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
A memo over an error boundary's output halts the scheduler when the boundary's source rejects during a held change. The rejection escapes as an uncaught error, and the screen stays on the old value instead of showing the boundary's fallback. If the render effect reads the boundary output directly, the fallback shows as expected.
import { createErrorBoundary, createMemo, createRenderEffect, createRoot, createSignal, flush, untrack } from "@solidjs/signals";
const asks = [];
let screen = "-";
const [sel, setSel] = createSignal(3);
createRoot(() => {
const detail = createMemo(() => { sel(); return new Promise((res, rej) => asks.push({ res, rej })); });
const shown = untrack(() => createErrorBoundary(() => detail(), () => "ERR"));
const t = createMemo(() => shown()); // remove this memo and it works
createRenderEffect(() => t(), v => { screen = v; });
});
// settle first ask with "A" -> screen "A"
// setSel(1); flush() -> held change, screen "A"
// reject second ask "boom" -> uncaught "boom", screen stays "A" (expected "ERR")
| shape | after reject |
|---|---|
| render effect reads the boundary output directly | ERR |
| render effect reads a memo over the output | uncaught boom, screen A |
The same uncaught error shows up when the memo is read under a <Loading> (without on). The bug is on next. Review of #4639 found it while probing error boundaries built outside a Loading.
Generated by Claude Code
- Lingua principale
- TypeScript
- Stelle
- 36.2k
- Fork
- 1.1k
- Merge medio
- 10h 10m
- PR unite (30g)
- 505
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di solidjs/solid
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 22/100
I maintainer di solito rispondono entro 1 giorno
-
What gets passed to the `when` prop of a `Show` still gets executed twice on SSRForse già presa @brenelz l’ha presa 4 giorni fa. Aperta1.x
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
solidjs/solid#4447 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di solidjs/solid
Issue simili
-
needs investigation
Difficoltà 2/5 1-3 ore Idoneità per principianti 60/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Makefile names visualizer gate targets that do not exist; the TS packages have no test runnerApertaarea:visualizer tech-debt
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 66/100
jmbarzee/temporal-architect#292 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
riverqueue/river#1576 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
colbymchenry/codegraph#3228 ·
I maintainer di solito rispondono entro 1 giorno