[2.0] A memo whose first read rejected reads `undefined` (not NotReady) in a verdict pass while it is re-asked
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- frontend
Línea de trabajo
Start with packages/signals/src/core/async.ts and core/verdict.d.ts, then trace how notifyStatus and verdictValue handle an initially rejected memo when it is re-asked. Reproduce with the issue's createSignal, createMemo, and isPending example; compare the observed [true, undefined] with the expected NotReadyError. Done when the re-ask and related latest or createDeferred reads no longer expose undefined before a value lands.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Version: solid-js / @solidjs/signals 2.0.0-rc.16, rc.17 and rc.18 (not rc.15).
The isPending contract (signals core/verdict.d.ts): "A read that has no value yet is loading, not pending — the probe reports only updates to a value that already exists."
Repro (no boundaries needed):
const [n, setN] = createSignal(0)
const m = createMemo(() => {
const i = n()
return i === 0 ? Promise.reject(new Error('boom')) : new Promise(r => setTimeout(() => r({ key: 'a' }), 50))
})
createRenderEffect(
() => { try { return [isPending(() => m()), m()] } catch (e) { return [e] } },
v => console.log(v)
)
// after the rejection: StatusError, as expected
setN(1) // re-ask
// observed until the landing: [true, undefined] -- expected: NotReadyError (no value has ever landed)
Cause (dev build): notifyStatus(STATUS_ERROR) clears STATUS_UNINITIALIZED (packages/signals/src/core/async.ts), so after the re-ask verdictValue treats the node as initialized and pending and returns el._value (undefined). latest(() => m()) and createDeferred read the same.
Effect in an app: a list whose first read failed; its Retry re-asks it; a <Show when={isPending(() => page()) && …}> in the region (or any pass that probes isPending and then reads the page) dereferences undefined and throws a TypeError into the error boundary, so the retried rows never paint.
- Lenguaje dominante
- TypeScript
- Estrellas
- 36.2k
- Forks
- 1.1k
- Merge medio
- 11 h
- PR fusionados (30 d)
- 343
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de solidjs/solid
-
`lazy()`: remounting an already-loaded component renders empty (or the Suspense fallback) since 1.9.14Posiblemente ocupada @itisrmk la tomó hace 8 días. Abierto1.x
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 56/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
`createRoot`'s dispose function keeps `fn` alive, so `<For>`/`<Index>` rows retain removed list itemsPosiblemente ocupada @boombang la tomó hace 10 días. Abierto1.x
Dificultad 4/5 1-2 días Aptitud para principiantes 45/100
Los mantenedores suelen responder en 1 día
-
Keep element state when the runtime moves a node (`moveBefore()` and not detaching what is re-inserted)Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoenhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
Todos los issues de solidjs/solid
Issues similares
-
[Bug]: Device screenshot fails with 500 on iPhone Duo (Xcode 27.2): serve-sim calls simctl without --displayPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
pingdotgg/t3code#24900 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
inu-appcenter/UNIDorm-web#411 ·
Los mantenedores suelen responder en 1 día
-
🐛 bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
ranxianglei/billion-context#4720 ·
Los mantenedores suelen responder en 1 día
-
area:arcade game p3-medium ready-for-agent type:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
fderuiter/deruiter.dev#2840 ·
Los mantenedores suelen responder en 1 día