[2.0 / next] Outside latest reads of a derivation expose errors and values at different times
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 22/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript, typescript
- Domain
- frontend
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- TypeScript
- Stars
- 36.1k
- Forks
- 1.1k
- Avg merge
- 11h 49m
- Merged PRs (30d)
- 346
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from solidjs/solid
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 18/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 Half a day Newbie friendliness 55/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 22/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 14/100
Maintainers usually reply within 1 day
Similar issues
-
Endpoint links in the tag operations list are below the 24px target sizePossibly taken @AdzerKI claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
ai-driven-qa bug Minor
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
linagora/twake-tasks#435 ·
Maintainers usually reply within 1 day
-
bug domain: database priority: p1 Stellar Wave
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
StellarState/SS-backend#632 · 1 comment ·
Maintainers usually reply within 1 day
-
A2A audit timestamps end in +00:00Z (invalid ISO 8601)Possibly taken @O1sumitkumar claimed this today. Openbug good first issue help wanted python
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
`cf complete zsh >> .zshrc` fails on vanilla zshMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
cloudflare/cf#340 ·
Maintainers usually reply within 1 day