Avatar for the carthage-software user
carthage-software
mago
BlogDocsChangelog

Performance History

Latest Results

fix(prelude): mark array_chunk chunks as non-empty Motivation: array_chunk() requires $length >= 1, so it never produces an empty chunk. The stub returned list<list<V>> / list<array<K, V>>, so returning the result as list<non-empty-list<V>> (or list<non-empty-array<K, V>> with $preserve_keys) was reported as an invalid return statement. This only affects the inferred type; no runtime behaviour changes. Approach: tighten the @return conditional in the array_chunk stub to list<non-empty-array<K, V>> / list<non-empty-list<V>>. An empty input still yields an empty outer list, which list<...> allows. Validation: added analyzer test arrays_array_chunk_non_empty. With the stub change reverted, `cargo test -p mago-analyzer array_chunk` fails with 2 invalid-return-statement issues; with the change it passes (6/6). `cargo test -p mago-analyzer -p mago-prelude` passes in full. I did not run the repo's lint/format CI targets. Report: https://github.com/carthage-software/mago/issues/2624 Signed-off-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com> Assisted-by: claude-sonnet-5-5 (via Claude Code)
pujitha24:auto/issue-2624
5 days ago

Latest Branches

CodSpeed Performance Gauge
0%
fix(prelude): mark array_chunk chunks as non-empty#2628
5 days ago
2ef9149
pujitha24:auto/issue-2624
CodSpeed Performance Gauge
0%
fix(analyzer): narrow iterable to array after !is_object()#2627
5 days ago
c3877e6
pujitha24:auto/issue-2620
CodSpeed Performance Gauge
+12%
8 days ago
c60a31d
serdarucel:fix/analyzer-nullsafe-comparison-assignment
© 2026 CodSpeed Technology
Home Terms Privacy Docs