array()'s cached string representation can go out of sync
まだ誰も着手していません。
評価
調査の方向性
まず、issue にある 2 つの再現例を使って、array() の文字列表現キャッシュと親の dirty マーク付けの動作を追跡します。ミューテーション後のキャッシュ済み出力を、基になる配列および可変なプリミティブ値と比較します。繰り返し送信されるメッセージが古い表現を返さなくなり、選択したキャッシュ動作がテストでカバーされれば完了です。
索引モデルが issue の本文から書いたものです。
説明
The cache used for array() its string representation runs out of sync with the actual array data in the following examples:
@a = array(1);
@b = array(@a);
@c = array(@a);
msg(@b); // Caching happens here, result is `{{1}}`.
msg(@c); // Caching happens here, result is `{{1}}`.
@a[0] = 2; // The array marks its last parent's cache as dirty, but not its other parent.
msg(@b); // Return cached result `{{1}}`, which is wrong at this point.
msg(@c); // Re-cache, returning the actual result `{{2}}`.
@a = mutable_primitive('test');
@b = array(@a);
msg(@b); // Caching happens here, result is `{test}`.
@a[] = 'newValue';
msg(@b); // Return cached result `{test}`, which is wrong at this point.
For arrays, marking all parents as dirty can be a solution (whereas it currently only marks the last parent as dirty). For mutable primitives, or user objects, the solution is not trivial. In my opinion, we could go without caching array string representations as soon as #1225 is merged and a similar solution for not sconcatting all code together is implemented in non-strict mode. I believe that arrays are not often used as their string representation, and if they are, they are rarely used twice (in which case the cache would improve performance).
- 主要言語
- Java
- スター
- 128
- フォーク
- 70
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
EngineHub/CommandHelper のほかの issue
-
discussion wanted documentation
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
EngineHub/CommandHelper#1403 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
EngineHub/CommandHelper#1370 · コメント 1 件 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
EngineHub/CommandHelper#1354 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
EngineHub/CommandHelper#1349 · コメント 3 件 ·
-
bug
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
EngineHub/CommandHelper#1341 · コメント 2 件 ·
EngineHub/CommandHelper の issue をすべて見る
似ている issue
-
certification
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's オープンbug ecr
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Needs: Triage Type: Feature request
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
AntennaPod/AntennaPod#8794 ·
-
agentic-workflows
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
github/copilot-sdk#2760 ·