Skip to content

chore(test): reuse EvaluationTracker to avoid multiple type-checks - #13652

Open
asterite wants to merge 1 commit into
masterfrom
ab/nargo-test-coverage-reuse
Open

asterite wants to merge 1 commit into
masterfrom
ab/nargo-test-coverage-reuse

Conversation

@asterite

Copy link
Copy Markdown
Collaborator

Problem Resolved

No issue.

Summary of Changes

Follow-up to #13633

When doing nargo test --coverage we'd type-check every test because we couldn't reuse the cached context because it has an ever changing EvaluationTracker. However, we can remember what was the coverage before running the test (because comptime code can already increase coverage), then restore that before running each test. A Clone impl for EvaluationTracker was needed for this. Then we can remove the ContextState enum.

User Documentation

Check one:

  • No user documentation needed.
  • Documented in docs/.
  • [For Experimental Features] Documentation tracking issue created:

PR Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@asterite
asterite requested a review from TomAFrench September 11, 2026 15:25

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant