You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
2.0: a pass that reads latest(s) before s() computes twice on a plain write #4402
On next @ 7ebd4a3 (and on #4401), a reader whose compute reads latest(s)befores() computes twice on a single plain synchronous write (no action, no async). Reading s() first computes once (pinned in #4401).
const[s,set]=createSignal(0);createRenderEffect(()=>[latest(s),s()],()=>{});// compute runs twice per set()set(1);flush();
The same happens inline in JSX or through a memo, and with a memo, render effect or user effect as the reader.
Why it happens. A pass that has read only latest() so far enters the verdict lane on purpose. That is what lets a Show over latest() mount its child once (#3540, boundary-not-born-held-3540 pins mounts [1, 2, 2]). The plain s() read that follows is then lane work, so it is served the screen (D-37) and runs again at the landing.
Letting the verdict lane's seam re-derive a staged read only if the flush parks breaks the inline latest-first park pin (v:0 l:1 beside the held write).
A fix needs the verdict lane's seam to treat verdict readers differently from lane work. The rules involved are D-22 (one pass; re-derive once only if the flush parks), D-37, F-10 and the #3540 ruling.
Expected: one compute per plain write whatever the read order, as for [s(), latest(s)].
Fixed on next by #4393 (81a12d8): the latest-first [latest(s), s()] read now computes once per plain write for render effects, memos and user effects. It ships in the next RC; a pin follows in a tests-only PR.
Activity
ryansolid commentedon Oct 29, 2026
Fixed on
nextby #4393 (81a12d8): the latest-first[latest(s), s()]read now computes once per plain write for render effects, memos and user effects. It ships in the next RC; a pin follows in a tests-only PR.Generated by Claude Code
test(signals): pin #4402 and #4398 as fixed by #4393; #4399 as a carv…
probe(signals): #4544 probed-held bit — a probe of an unheld node ear…