Skip to content

implement exception __context__#421

Draft
davidhewitt wants to merge 4 commits into
mainfrom
dh/return-finally
Draft

implement exception __context__#421
davidhewitt wants to merge 4 commits into
mainfrom
dh/return-finally

Conversation

@davidhewitt
Copy link
Copy Markdown
Collaborator

This PR implements exception __context__ attribute plus fixes various cases with bare raise that I (with Claude's help) found while doing so (see new test cases).

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 7, 2026

Merging this PR will not alter performance

✅ 17 untouched benchmarks
⏩ 15 skipped benchmarks1


Comparing dh/return-finally (bb2f70c) with main (1346bad)2

Open in CodSpeed

Footnotes

  1. 15 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on main (788cffe) during the generation of this report, so 1346bad was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Codecov Results 📊

❌ Patch coverage is 67.82%. Project has 23474 uncovered lines.
✅ Project coverage is 65.05%. Comparing base (base) to head (head).

Files with missing lines (9)
File Patch % Lines
crates/monty/src/exception_private.rs 73.08% ⚠️ 14 Missing and 5 partials
crates/monty/src/bytecode/vm/exceptions.rs 58.06% ⚠️ 13 Missing and 4 partials
crates/monty/src/bytecode/compiler.rs 62.50% ⚠️ 12 Missing and 3 partials
crates/monty/src/heap.rs 37.50% ⚠️ 5 Missing and 2 partials
crates/monty/src/heap_traits.rs 42.86% ⚠️ 4 Missing and 1 partials
crates/monty/src/prepare.rs 73.33% ⚠️ 4 Missing and 1 partials
crates/monty/src/value.rs 0.00% ⚠️ 3 Missing
crates/monty/src/parse.rs 66.67% ⚠️ 1 Missing and 1 partials
crates/monty/src/bytecode/vm/mod.rs 100.00% ⚠️ 1 partials
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    64.95%    65.05%     +0.1%
==========================================
  Files          263       263         —
  Lines        66949     67171      +222
  Branches    143813    144258      +445
==========================================
+ Hits         43483     43697      +214
- Misses       23466     23474        +8
- Partials      3234      3248       +14

Generated by Codecov Action

@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

@davidhewitt
Copy link
Copy Markdown
Collaborator Author

This is problematic because __context__ introduces heap references into RunError. Need a strategy to get that right before we proceed here.

@davidhewitt davidhewitt marked this pull request as draft May 14, 2026 10:15
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 16 files

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