[2.0 / next] Outside latest reads of a derivation expose errors and values at different times
メンテナーはふだん 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:
- 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.
- 主要言語
- TypeScript
- スター
- 36.1k
- フォーク
- 1.1k
- 平均マージ
- 11時間 32分
- マージ済み PR(30日)
- 356
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
solidjs/solid のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 14/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 18/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
aws/agentcore-cli#2606 ·
メンテナーはふだん 1 日以内に返信
-
ai-driven-qa bug Cosmetic
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
ai-driven-qa bug claude Minor
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
linagora/twake-mail-admin#301 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
reproduced
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
anomalyco/opencode#56038 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信