Skip to content
This repository has been archived by the owner on Nov 7, 2022. It is now read-only.

fix(formula): spreadsheet deadlock #458

Merged
merged 4 commits into from
Jul 22, 2022
Merged

fix(formula): spreadsheet deadlock #458

merged 4 commits into from
Jul 22, 2022

Conversation

toadfanszz
Copy link
Contributor

@toadfanszz toadfanszz commented Jul 22, 2022

  1. Fix deadlock caused by deleted column.
  2. Fix deadlock caused by circular dependency.
  3. Add more testCases.
A1: `=A.2`
A2: `=A.1`

or

A1: `=A.2`
A2: `=num1`
num1: `=A.1`

NOTE that there is still a BUG that if cell is not initialized, these cases can cause a deadlock.
I add a TODO message for this scene.

https://github.com/mashcard/mashcard/pull/458/files#diff-58761a092ff0f5d6bf7997ee740f8c81e2abfdbbe92745389b7dd7c7bb4ae652R258

@github-actions
Copy link
Contributor

This pull request has been built and is available for preview at pr458.mashcard.dev.
Default username/password is test1@example.com & test1234.

Devtools

@codecov
Copy link

codecov bot commented Jul 22, 2022

Codecov Report

Merging #458 (92b5cbc) into main (f94aa20) will increase coverage by 0.16%.
The diff coverage is 97.10%.

@@            Coverage Diff             @@
##             main     #458      +/-   ##
==========================================
+ Coverage   69.64%   69.81%   +0.16%     
==========================================
  Files        1060     1062       +2     
  Lines       18035    18093      +58     
  Branches     2499     2513      +14     
==========================================
+ Hits        12561    12631      +70     
+ Misses       5162     5151      -11     
+ Partials      312      311       -1     
Flag Coverage Δ
frontend-unit 65.51% <97.10%> (+0.22%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/formula/src/controls/spreadsheet.ts 71.51% <ø> (ø)
...kages/formula/src/grammar/operations/thisRecord.ts 75.75% <ø> (ø)
packages/formula/src/tests/testType.ts 83.33% <ø> (ø)
...omponents/blockViews/Spreadsheet/useSpreadsheet.ts 30.40% <ø> (ø)
packages/formula/src/tests/testHelper.ts 86.82% <71.42%> (+0.20%) ⬆️
packages/formula/src/context/variable.ts 82.50% <100.00%> (+0.35%) ⬆️
packages/formula/src/controls/block.ts 87.71% <100.00%> (ø)
packages/formula/src/controls/column.ts 93.44% <100.00%> (+2.06%) ⬆️
packages/formula/src/controls/row.ts 78.72% <100.00%> (+5.39%) ⬆️
packages/formula/src/grammar/dependency.ts 86.48% <100.00%> (+2.61%) ⬆️
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f94aa20...92b5cbc. Read the comment docs.

@toadfanszz toadfanszz merged commit 19b9b5a into main Jul 22, 2022
@toadfanszz toadfanszz deleted the fix-formula-deadlock branch July 22, 2022 10:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Formula dead lock when delete column
2 participants