Skip to content

fix(named-expressions): mark named expressions as dirty before re-computation #1504

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Esmail-Rahmani
Copy link

@Esmail-Rahmani Esmail-Rahmani commented Apr 26, 2025

Context

It fixes an issue where named expressions were not marked as dirty after clearing dirty nodes in setCellContents, causing dependent formulas not to update correctly on subsequent value changes.

The fix ensures that all active named expressions are safely re-marked as dirty before recomputation in the recomputeIfDependencyGraphNeedsIt function.

How did you test your changes?

Manually tested by:

  • Creating named expressions and using them in formulas.
  • Updating the underlying cell values multiple times.
  • Confirming that dependent formulas are recomputed correctly after each update.
  • Validating that the behavior matches expectations across multiple updates and that no dirty state is lost.

Ran the existing unit tests to ensure no regressions were introduced.

Types of changes

  • Breaking change (a fix or a feature because of which an existing functionality doesn't work as expected anymore)
  • New feature or improvement (a non-breaking change that adds functionality)
  • Bug fix (a non-breaking change that fixes an issue)
  • Additional language file, or a change to an existing language file (translations)
  • Change to the documentation

Related issues:

  1. Fixes [Bug]: Named expression defined as a cell range does not recalculate #1501

Checklist:

  • I have reviewed the guidelines about Contributing to HyperFormula and I confirm that my code follows the code style of this project.
  • I have signed the Contributor License Agreement.
  • My change is compliant with the OpenDocument standard.
  • My change is compatible with Microsoft Excel.
  • My change is compatible with Google Sheets.
  • I described my changes in the CHANGELOG.md file.
  • My changes require a documentation update.
  • My changes require a migration guide.

@AMBudnik
Copy link
Contributor

Thank you for sharing the pull request @Esmail-Rahmani

I will inform the rest of the team.

@AMBudnik AMBudnik added the CLA signed Required for PR label Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA signed Required for PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Named expression defined as a cell range does not recalculate
2 participants