Skip to content

feat(diagnostics)!: Emit warning for unreachable code#1660

Draft
ss2165 wants to merge 2 commits intoss/push-kvqpqswszwxofrom
ss/push-okqyxvllnpnk
Draft

feat(diagnostics)!: Emit warning for unreachable code#1660
ss2165 wants to merge 2 commits intoss/push-kvqpqswszwxofrom
ss/push-okqyxvllnpnk

Conversation

@ss2165
Copy link
Copy Markdown
Member

@ss2165 ss2165 commented Apr 13, 2026

Closes #739

Based on warning framework in #1659

Add run_warning_test for rendered warning tests

Assert warning is appropriately raised in existing unreachable tests

Developed in iteration with Codex.

BREAKING CHANGE: internals: UnreachableError (unused) renamed to UnreachableWarning

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 13, 2026

🐰 Bencher Report

Branchss/push-okqyxvllnpnk
TestbedLinux

🚨 2 Alerts

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
tests/benchmarks/test_big_array.py::test_big_array_executableLatency
seconds (s)
📈 plot
🚷 threshold
🚨 alert (🔔)
8.61 s
(+8.66%)Baseline: 7.93 s
8.32 s
(103.49%)

tests/benchmarks/test_ctrl_flow.py::test_many_ctrl_flow_compileLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
235.08 ms
(+8.04%)Baseline: 217.59 ms
228.47 ms
(102.89%)

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
763,617.11 µs
(-11.22%)Baseline: 860,106.10 µs
903,111.40 µs
(84.55%)
tests/benchmarks/test_big_array.py::test_big_array_compile📈 view plot
🚷 view threshold
1,981,326.62 µs
(+4.30%)Baseline: 1,899,661.84 µs
1,994,644.93 µs
(99.33%)
tests/benchmarks/test_big_array.py::test_big_array_executable📈 view plot
🚷 view threshold
🚨 view alert (🔔)
8,614,689.01 µs
(+8.66%)Baseline: 7,927,887.31 µs
8,324,281.68 µs
(103.49%)

tests/benchmarks/test_ctrl_flow.py::test_many_ctrl_flow_check📈 view plot
🚷 view threshold
105,477.96 µs
(+3.09%)Baseline: 102,315.01 µs
107,430.77 µs
(98.18%)
tests/benchmarks/test_ctrl_flow.py::test_many_ctrl_flow_compile📈 view plot
🚷 view threshold
🚨 view alert (🔔)
235,075.45 µs
(+8.04%)Baseline: 217,587.28 µs
228,466.64 µs
(102.89%)

tests/benchmarks/test_ctrl_flow.py::test_many_ctrl_flow_executable📈 view plot
🚷 view threshold
953,258.27 µs
(-18.98%)Baseline: 1,176,634.37 µs
1,235,466.09 µs
(77.16%)
tests/benchmarks/test_prelude.py::test_import_guppy📈 view plot
🚷 view threshold
49.85 µs
(-3.53%)Baseline: 51.67 µs
54.26 µs
(91.88%)
🐰 View full continuous benchmarking report in Bencher

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 13, 2026

🐰 Bencher Report

Branchss/push-okqyxvllnpnk
TestbedLinux
Click to view all benchmark results
Benchmarkhugr_bytesBenchmark Result
bytes x 1e3
(Result Δ%)
Upper Boundary
bytes x 1e3
(Limit %)
hugr_nodesBenchmark Result
nodes x 1e3
(Result Δ%)
Upper Boundary
nodes x 1e3
(Limit %)
tests/benchmarks/test_big_array.py::test_big_array_compile📈 view plot
🚷 view threshold
158.77 x 1e3
(0.00%)Baseline: 158.77 x 1e3
160.36 x 1e3
(99.01%)
📈 view plot
🚷 view threshold
6.64 x 1e3
(0.00%)Baseline: 6.64 x 1e3
6.71 x 1e3
(99.01%)
tests/benchmarks/test_ctrl_flow.py::test_many_ctrl_flow_compile📈 view plot
🚷 view threshold
27.53 x 1e3
(0.00%)Baseline: 27.53 x 1e3
27.81 x 1e3
(99.01%)
📈 view plot
🚷 view threshold
1.07 x 1e3
(0.00%)Baseline: 1.07 x 1e3
1.08 x 1e3
(99.01%)
🐰 View full continuous benchmarking report in Bencher

@maximilianruesch maximilianruesch linked an issue Apr 14, 2026 that may be closed by this pull request
@ss2165 ss2165 force-pushed the ss/push-okqyxvllnpnk branch from b0ef8a3 to 069945a Compare April 14, 2026 10:44
@ss2165 ss2165 force-pushed the ss/push-kvqpqswszwxo branch from a9570d0 to a4a1b20 Compare April 14, 2026 13:31
@ss2165 ss2165 force-pushed the ss/push-okqyxvllnpnk branch from 069945a to 8a59cd4 Compare April 14, 2026 13:31
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.56%. Comparing base (74aefe0) to head (d4e25bc).

Additional details and impacted files
@@                   Coverage Diff                    @@
##           ss/push-kvqpqswszwxo    #1660      +/-   ##
========================================================
+ Coverage                 93.54%   93.56%   +0.01%     
========================================================
  Files                       134      134              
  Lines                     12744    12749       +5     
========================================================
+ Hits                      11922    11929       +7     
+ Misses                      822      820       -2     

☔ 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.

@ss2165 ss2165 force-pushed the ss/push-okqyxvllnpnk branch from 8a59cd4 to d4e25bc Compare April 14, 2026 13:51
@ss2165 ss2165 force-pushed the ss/push-kvqpqswszwxo branch from a4a1b20 to 74aefe0 Compare April 14, 2026 13:51
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.

Emit warning for unreachable code

2 participants