[Bug]: copy+pasting a formula that includes number in exponential format fails with the error "There is no AST with such key in the cache"
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- backend
Research direction
Start by reproducing the failure with the provided HyperFormula setup, focusing on the hf.copy() and hf.paste() entry points for the formula =1.25e+5. Compare this path with copying the first three columns; done means the exponential-formula copy and paste complete without the AST cache error and preserve the expected value.
Written by the indexing model from the issue text.
Description
Description
Attempting to copy+paste a formula that includes exponential notation (e.g. "=1.25e+5") results in the error:
There is no AST with such key in the cache
code to reproduce:
import HyperFormula from 'hyperformula';
const hf = HyperFormula.buildEmpty({
licenseKey: 'gpl-v3',
});
const sheetName = hf.addSheet('main');
const sheetId = hf.getSheetId(sheetName);
// Arrange data
const tableData = [['100000', '1.25e+5', '=100000', '=1.25e+5']];
hf.setCellContents(
{
row: 0,
col: 0,
sheet: sheetId,
},
tableData
);
// Act - copying the first three columns works fine:
hf.copy({
start: { sheet: sheetId, col: 0, row: 0 },
end: { sheet: sheetId, col: 2, row: 0 },
});
hf.paste({ sheet: sheetId, col: 0, row: 1 });
const row1Values = hf.getRangeValues({
start: { sheet: sheetId, col: 0, row: 1 },
end: { sheet: sheetId, col: 2, row: 1 },
});
console.log({ row1Values }); // as expected, values are: [100000, 125000, 100000]
// Act - copying the last column gives the error:
hf.copy({
start: { sheet: sheetId, col: 3, row: 0 },
end: { sheet: sheetId, col: 3, row: 0 },
});
hf.paste({ sheet: sheetId, col: 3, row: 1 }); // results in: Error: There is no AST with such key in the cache
Video or screenshots
No response
Demo
https://stackblitz.com/edit/js-1prf9j?file=index.js,index.html
HyperFormula version
2.5.0
Your framework
No response
Your environment
Chrome 114
- Dominant language
- TypeScript
- Stars
- 2.8k
- Forks
- 171
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from handsontable/hyperformula
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
handsontable/hyperformula#1745 ·
-
Bug Impact: Low
Difficulty 1/5 1-3 hours Newbie friendliness 68/100
handsontable/hyperformula#1641 ·
-
Bug
Difficulty 4/5 3-5 days Newbie friendliness 55/100
handsontable/hyperformula#1746 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
handsontable/hyperformula#1744 ·
-
ANNOUNCEMENT
Difficulty 1/5 Under an hour Newbie friendliness 20/100
handsontable/hyperformula#1685 · 2 reactions ·
All issues in handsontable/hyperformula
Similar issues
-
comp/dashboard P3 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
NousResearch/hermes-agent#117722 ·
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·