Skip to content

fix: Restrict empty_array to non-copyable types - #2527

Open
tatiana-s wants to merge 1 commit into
mainfrom
ts/restrict-empty-array
Open

tatiana-s wants to merge 1 commit into
mainfrom
ts/restrict-empty-array

Conversation

@tatiana-s

@tatiana-s tatiana-s commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Closes #2489

Note there are still issues around non-frozen structs with all classical fields with this as these are affine types that lower to a copyable bound (as opposed to affine arrays which lower to a linear bound so are all good) but these extend to other array accesses too so see this separate issue: #2528

@tatiana-s
tatiana-s requested a review from a team as a code owner November 11, 2026 14:23
@tatiana-s
tatiana-s requested a review from mark-koch November 11, 2026 14:23
@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectguppylang
Branchts/restrict-empty-array
TestbedLinux
Click to view all benchmark results
Benchmarkhugr_bytesBenchmark Result
bytes x 1e3
(Result Δ%)
Upper Boundary
bytes x 1e3
(Limit %)
hugr_nodesBenchmark Result
nodes
(Result Δ%)
Upper Boundary
nodes
(Limit %)
tests/benchmarks/test_big_array.py::test_big_array_compile📈 view plot
🚷 view threshold
59.84 x 1e3
(0.00%)Baseline: 59.84 x 1e3
60.44 x 1e3
(99.01%)
📈 view plot
🚷 view threshold
4,514.00
(0.00%)Baseline: 4,514.00
4,559.14
(99.01%)
tests/benchmarks/test_ctrl_flow.py::test_many_ctrl_flow_compile📈 view plot
🚷 view threshold
26.87 x 1e3
(0.00%)Baseline: 26.87 x 1e3
27.14 x 1e3
(99.01%)
📈 view plot
🚷 view threshold
1,182.00
(0.00%)Baseline: 1,182.00
1,193.82
(99.01%)
tests/benchmarks/test_queue_push_pop.py::test_queue_push_benchmark_compile📈 view plot
🚷 view threshold
6.70 x 1e3
(0.00%)Baseline: 6.70 x 1e3
6.77 x 1e3
(99.01%)
📈 view plot
🚷 view threshold
279.00
(0.00%)Baseline: 279.00
281.79
(99.01%)
tests/benchmarks/test_queue_push_pop.py::test_queue_push_pop_benchmark_compile📈 view plot
🚷 view threshold
9.22 x 1e3
(0.00%)Baseline: 9.22 x 1e3
9.31 x 1e3
(99.01%)
📈 view plot
🚷 view threshold
371.00
(0.00%)Baseline: 371.00
374.71
(99.01%)
🐰 View full continuous benchmarking report in Bencher

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.80488% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.37%. Comparing base (5a06a25) to head (9eb3b00).

Files with missing lines Patch % Lines
...s/src/guppylang_internals/std/_internal/checker.py 72.22% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2527      +/-   ##
==========================================
- Coverage   93.40%   93.37%   -0.04%     
==========================================
  Files         167      167              
  Lines       17050    17084      +34     
==========================================
+ Hits        15926    15952      +26     
- Misses       1124     1132       +8     

☔ View full report in Codecov by Harness.
📢 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.

@codspeed

codspeed Bot commented Nov 11, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

⚠️ 7 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 11 untouched benchmarks


Comparing ts/restrict-empty-array (9eb3b00) with main (5a06a25)

Open in CodSpeed

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.

[Bug]: array.put panics when filling empty_array with copyable elements

2 participants