[Bug]: An array literal that starts with a spilled range changes that range's stored values
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 67/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- node.js, typescript
調査の方向性
Start with the array evaluation path in Interpreter.ts at the reported ARRAY branch and ArrayValue.ts where raw() exposes row arrays. Reproduce the example from the issue and trace how a range matching a spilled result is used while building the literal. Done means the literal copies the rows it builds from, the spill result stays unchanged on recalculation, and the reported formulas return the expected values.
索引モデルが issue の本文から書いたものです。
説明
Description
When the first element in a row of an array literal is a range that exactly matches another formula's spilled result, the literal appends the row's other elements to that formula's stored result. The cells still show the right values, but formulas that read the range as an array get wrong results:
const hf = HyperFormula.buildFromArray([
['=SEQUENCE(2)', 10, '=SUM({A1:A2,B1:B2})', '=SUMPRODUCT(A1:A2,A1:A2)'],
[null, 20],
], {licenseKey: 'gpl-v3'})
hf.getCellValue({sheet: 0, col: 3, row: 0}) // 505, expected 5
hf.getCellValue({sheet: 0, col: 2, row: 0}) // 33, correct
// A1:A2 still show 1 and 2
With plain values 1 and 2 in A1:A2, D1 returns 5. In Microsoft Excel Online, =SUMPRODUCT(A1:A2,A1:A2) over =SEQUENCE(2) returns 5. (Excel doesn't accept references inside array constants, so the literal itself can't be compared.)
If the literal's formula is recalculated, for example because it also contains RAND(), the stored result gains another column every time.
Cause: a range that matches a spilled result is evaluated through ArrayValue.raw(), which returns the result's own row arrays (Interpreter.ts:213 and :222, ArrayValue.ts:132-134). The ARRAY branch of Interpreter.evaluateAst then pushes the next elements into those rows (Interpreter.ts:266 and :269).
Expected: the array literal copies the rows it builds from, and the other formula's result stays unchanged.
Video or screenshots
N/A
Demo
Code snippet in the description.
HyperFormula version
3.5.0 (also develop at ec7512d21)
Your framework
None (Node.js)
Your environment
Node.js 22.23.4 on Linux
- 主要言語
- TypeScript
- スター
- 2.8k
- フォーク
- 175
- 平均マージ
- 2日 5時間
- マージ済み PR(30日)
- 23
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
handsontable/hyperformula のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
handsontable/hyperformula#1803 ·
メンテナーはふだん 1 日以内に返信
-
numberToSimpleDate returns day 0 for 31 December of some years when leapYear1900 is true対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
handsontable/hyperformula#1793 ·
メンテナーはふだん 1 日以内に返信
-
Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
handsontable/hyperformula#1745 ·
メンテナーはふだん 1 日以内に返信
-
Bug Impact: Low
難易度 1/5 1〜3時間 初心者へのやさしさ 68/100
handsontable/hyperformula#1641 ·
メンテナーはふだん 1 日以内に返信
-
Bug
難易度 3/5 1〜2日 初心者へのやさしさ 74/100
handsontable/hyperformula#1878 ·
メンテナーはふだん 1 日以内に返信
handsontable/hyperformula の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
pending close triaging
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
anomalyco/opencode#62582 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
feature request
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
callstack/react-native-paper#5189 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
live-codes/livecodes#1079 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Add: ESP 2 ROオープンapproved check:passed streams:add
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信