Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[2.0 / next] Outside latest reads of a derivation expose errors and values at different times

オープン
#4,106 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
22/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
javascript, typescript
領域
frontend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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:

  1. Click Start update, then Reject source.
  2. Click Read latest. The output shows latest(source): boom but latest(derived): 1. The read helper catches thrown errors and displays their messages. The committed round remains 1 because the sibling is still pending.
  3. Click Release sibling, then Read latest again. Both reads now throw boom, and the committed round is 2.

Successful result:

  1. Reload the playground.
  2. Click Start update, then Resolve source to 2 (control).
  3. Click Read latest before releasing the sibling. Both reads already return 2, while the committed round remains 1.
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 next build at d5e32a9af41c7bfe0bc090f7438ee4297d540b17, which includes #4085.
Additional context

Related to #4085. Both the rejection and fulfillment paths were verified in the hosted playground.

The related publication rules are D-22 and D-41.

主要言語
TypeScript
スター
36.1k
フォーク
1.1k
平均マージ
11時間 32分
マージ済み PR(30日)
356

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

solidjs/solid のほかの issue

solidjs/solid の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。