Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Uncaught "Resizing to smaller array" when a spilling VSTACK/HSTACK/array literal contains an element whose size depends on a cell

Aperta
#1,780 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
75/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
backend

Direzione di ricerca

Start with vstackArraySize, hstackArraySize, and the ARRAY case of ArraySizePredictor, then inspect ArrayValue.resize and the SEQUENCE size prediction. Reproduce the cases through buildFromArray and setCellContents(B1, 2); done means unknown element sizes no longer cause a smaller-array error and the dependent spill stays consistent.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

HyperFormula.buildFromArray([['=VSTACK(SEQUENCE(B1),SEQUENCE(2))', 2]], {licenseKey: 'gpl-v3'}) throws Error: Resizing to smaller array instead of spilling 1,2,1,2. Same for =HSTACK(SEQUENCE(1,B1),SEQUENCE(1,2)), ={SEQUENCE(B1);1} and =ARRAY_CONSTRAIN(VSTACK(SEQUENCE(B1),SEQUENCE(2)),4,1). When it happens on setCellContents(B1, 2) the engine is left inconsistent (B1 holds 2, A1 still shows the values for B1 = 1).

Cause: vstackArraySize/hstackArraySize (and the ARRAY case of ArraySizePredictor) add up sub-sizes without checking isRef, so an element of unknown size counts as 1×1 and the predicted array is smaller than the evaluated one; ArrayValue.resize then throws. Wrapping the stack in a scalar function avoids it because the prediction is scalar.

Expected: when any element's size is unknown, the stack should predict ArraySize.error() (scalar fallback), as SEQUENCE itself does.

Reproduced on develop at c920375 (the merge-base of #1774; develop has had no src/ changes since). Unrelated to #1774, except that its runtime guard now returns #VALUE! when the evaluated stack also exceeds maxRows.

Lingua principale
TypeScript
Stelle
2.8k
Fork
174
Merge medio
2g 16h
PR unite (30g)
9

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di handsontable/hyperformula

Tutte le issue di handsontable/hyperformula

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.