Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[2.0 / next] A direct write does not clear a writable memo's previous error

Aperta
#4,110 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript, typescript
Ambito
frontend

Direzione di ricerca

Start in packages/signals/src/signals.ts, where the createSignal documentation near line 368 says a direct write should replace the stored error without rerunning the derivation. Read the failed-writable-memo cases and candidate changes in #3886 and the held-error rule in #4085 before touching the write path. Done means a reduced source regression where a write after a throwing initial derivation makes accessor reads, createEffect and the error boundary show the written value.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the bug

A writable memo throws during its initial derivation, and <Errored> shows the error. A button outside the boundary calls its setter with 2, but the boundary continues showing the original error instead of rendering the written value.

Your Example Website or App

https://s.olid.uk/id/PmShIVyvSYWMQLTS5qkkSA

Steps to Reproduce the Bug or Issue
  1. Open the playground. The boundary shows Error: boom.
  2. Click Set value to 2.
  3. The boundary continues showing Error: boom instead of Value: 2.
Expected behavior

The direct write should replace the memo's failed outcome with 2, allowing the boundary to recover and render Value: 2 without rerunning the derivation.

Screenshots or Videos

No response

Platform
  • OS: Linux
  • Browser: Chromium 154.0.8037.57
  • Solid: playground pinned to next@d5e32a9af41c7bfe0bc090f7438ee4297d540b17. A reduced source regression also fails on current next@ccd99481deed3ebb567ee11ab7a152ced84d122b.
Additional context

The createSignal documentation says a direct write lands without rerunning the derivation.

The failure also affects ordinary accessor reads and createEffect, which retain the old error after a write. This playground makes it visible through an error boundary.

The failed-writable-memo cases from #3886 are explicitly outside #4085's held-error rule. #3886 contains related regression tests and candidate changes.

Lingua principale
TypeScript
Stelle
36.1k
Fork
1.1k
Merge medio
11h 49m
PR unite (30g)
346

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di solidjs/solid

Tutte le issue di solidjs/solid

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.