[2.0 / next] Outside latest reads of a derivation expose errors and values at different times
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
- 22/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, typescript
- Ambito
- frontend
Direzione di ricerca
Start with the publication rules in packages/signals/docs/RULES-DERIVED.md, specifically D-22 and D-41, then reproduce in the playground steps listed in the issue. Compare how latest(derived) publishes a fulfilled value versus a rejected one while a sibling is pending, since the two paths currently diverge. Done means both outcomes become visible at the same point, with the held-frame behaviour matching the async sibling case. Design choices here are contested, so confirm the intended rule with maintainers before changing code.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
With derived = createMemo(() => latest(source)), outside reads of latest(derived) expose successful and failed outcomes at different points during a held update.
A successful result becomes readable before the frame reveals. A rejection only becomes observable through the derivation after reveal, even though direct latest(source) already throws it. An async sibling keeps the frame held in both cases.
Your Example Website or App
https://s.olid.uk/id/Bp_ILv8vREiTHbnn0x6Ppg
Steps to Reproduce the Bug or Issue
Wait for Derived effect: 1 and Committed round: 1. The Read latest button samples both accessors from an event handler, outside a reactive computation.
Rejected result:
- Click Start update, then Reject source.
- Click Read latest. The output shows
latest(source): boombutlatest(derived): 1. The read helper catches thrown errors and displays their messages. The committed round remains1because the sibling is still pending. - Click Release sibling, then Read latest again. Both reads now throw
boom, and the committed round is2.
Successful result:
- Reload the playground.
- Click Start update, then Resolve source to 2 (control).
- Click Read latest before releasing the sibling. Both reads already return
2, while the committed round remains1.
Expected behavior
Outside reads should follow a consistent publication rule for successful and failed outcomes.
The point at which latest(derived) exposes a new outcome should not depend on whether the source fulfills or rejects.
Screenshots or Videos
No response
Platform
- OS: Linux
- Browser: Chromium 154.0.8037.57
- Solid: playground pinned to the
nextbuild atd5e32a9af41c7bfe0bc090f7438ee4297d540b17, which includes #4085.
Additional context
Related to #4085. Both the rejection and fulfillment paths were verified in the hosted playground.
- Lingua principale
- TypeScript
- Stelle
- 36.1k
- Fork
- 1.1k
- Merge medio
- 11h 32m
- PR unite (30g)
- 356
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
-
[2.0 / next] Error formatting and async iterator protocol failures escape memo error handlingAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 14/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 18/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 15/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di solidjs/solid
Issue simili
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 75/100
siyuan-note/siyuan#20629 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Volume eject does not refuse system, root or /home mountsForse già presa @bernardopg l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
spacedriveapp/spacedrive#3159 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
melgarafael/DeskcommCRM#3000 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
callstackincubator/simlock#639 ·
I maintainer di solito rispondono entro 1 giorno