Skip to content

feat!: improved error handling in modifiers#1580

Draft
nicolaassolini-qntm wants to merge 2 commits intomainfrom
na/1288-dummy-name-from-modifiedblocks
Draft

feat!: improved error handling in modifiers#1580
nicolaassolini-qntm wants to merge 2 commits intomainfrom
na/1288-dummy-name-from-modifiedblocks

Conversation

@nicolaassolini-qntm
Copy link
Contributor

close #1288

  • Solved the issue related to error messages with ownership violation in modifier blocks by adding a special flag in check_cfg to state when we are checking the modifier block.

  • Updated the NotOwnError to handle this special case

BREAKING CHANGE: added a flied first_modifier_node: ast.expr to guppylang_internals/nodes.py:ModifiedBlockBREAKING CHANGE: change the fieldis_call_arg change in guppylang_internals/checker/errors/linearity.py:NotOwnedError from a boolean to an Enum

@hugrbot
Copy link
Collaborator

hugrbot commented Mar 20, 2026

This PR contains breaking changes to the public Python API.

Breaking changes summary
guppylang-internals/src/guppylang_internals/nodes.py:788: ModifiedBlock.__init__(first_modifier_node):
Parameter was added as required


@github-actions
Copy link
Contributor

🐰 Bencher Report

Branchna/1288-dummy-name-from-modifiedblocks
TestbedLinux

🚨 1 Alert

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
tests/benchmarks/test_big_array.py::test_big_array_compileLatency
seconds (s)
📈 plot
🚷 threshold
🚨 alert (🔔)
1.93 s
(+6.35%)Baseline: 1.82 s
1.91 s
(101.29%)

Click to view all benchmark results
BenchmarkLatencyBenchmark Result
microseconds (µs)
(Result Δ%)
Upper Boundary
microseconds (µs)
(Limit %)
tests/benchmarks/test_big_array.py::test_big_array_check📈 view plot
🚷 view threshold
702,616.70 µs
(+1.13%)Baseline: 694,747.55 µs
729,484.93 µs
(96.32%)
tests/benchmarks/test_big_array.py::test_big_array_compile📈 view plot
🚷 view threshold
🚨 view alert (🔔)
1,933,708.59 µs
(+6.35%)Baseline: 1,818,201.03 µs
1,909,111.08 µs
(101.29%)

tests/benchmarks/test_big_array.py::test_big_array_executable📈 view plot
🚷 view threshold
8,325,898.59 µs
(+4.83%)Baseline: 7,942,167.96 µs
8,339,276.35 µs
(99.84%)
tests/benchmarks/test_ctrl_flow.py::test_many_ctrl_flow_check📈 view plot
🚷 view threshold
50,160.74 µs
(+3.35%)Baseline: 48,532.67 µs
50,959.30 µs
(98.43%)
tests/benchmarks/test_ctrl_flow.py::test_many_ctrl_flow_compile📈 view plot
🚷 view threshold
107,533.05 µs
(+2.53%)Baseline: 104,882.27 µs
110,126.38 µs
(97.65%)
tests/benchmarks/test_ctrl_flow.py::test_many_ctrl_flow_executable📈 view plot
🚷 view threshold
609,599.47 µs
(+1.02%)Baseline: 603,454.24 µs
633,626.95 µs
(96.21%)
tests/benchmarks/test_prelude.py::test_import_guppy📈 view plot
🚷 view threshold
56.71 µs
(+2.40%)Baseline: 55.38 µs
58.15 µs
(97.52%)
🐰 View full continuous benchmarking report in Bencher

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.56%. Comparing base (b6496f3) to head (2aca1a3).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1580      +/-   ##
==========================================
+ Coverage   93.55%   93.56%   +0.01%     
==========================================
  Files         130      130              
  Lines       12274    12347      +73     
==========================================
+ Hits        11483    11553      +70     
- Misses        791      794       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Dummy function name generated from ModifiedBlocks used in cfg_checker

3 participants