Skip to content

Count only the vcat specializations a splat adds in the concatenation test - #1171

Merged
ViralBShah merged 1 commit into
mainfrom
vs/concat-specializations-order
Nov 13, 2026
Merged

ViralBShah merged 1 commit into
mainfrom
vs/concat-specializations-order

Conversation

@ViralBShah

Copy link
Copy Markdown
Member

The splatted-vcat check that #1160 added to test/concatenation.jl fails in comprehensive mode when test/solvers/issues.jl runs before it in the same worker, which ParallelTestRunner does on some runs. It failed that way on #1170.

Before, running the two suites in that order in one process on main:

# SPARSEARRAYS_TEST_COMPREHENSIVE=true julia --project
using Test, LinearAlgebra, SparseArrays
for f in ("test/solvers/issues.jl", "test/concatenation.jl")
    Base.include(Module(), abspath(f))
end
dense concatenation behaves as without SparseArrays (#1155): Test Failed at test/concatenation.jl:662
  Expression: length(collect(Base.specializations(m))) < 5
   Evaluated: 5 < 5

After: it passes in that order, and alone.

The check counts every specialization of vcat(n1::N, ns::N...) where N<:Number, which takes every Number eltype, so it counts what earlier suites compiled too. test/solvers/issues.jl concatenates Ints, which compiles Tuple{typeof(vcat), Vararg{Int64, 4}} and Tuple{typeof(vcat), Int64, Int64, Int64, Vararg{Int64}}. The splats of 50 to 60 Float64s add three specializations, so the total reaches the bound. The test now counts only the specializations the splats add. A method compiled once for every length would add 11, so the bound still catches the regression #1160 fixed. The code is unchanged.

To be backported to 1.14 in #1170.

Written by Claude Code.

🤖 Generated with Claude Code

…on test

The method of `vcat` for numbers takes every `Number` eltype, and other
suites run first in the same worker, so the count of its specializations
reached the bound when `test/solvers/issues.jl` concatenated `Int`s
before `test/concatenation.jl` ran.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ViralBShah ViralBShah mentioned this pull request Nov 13, 2026
10 tasks done
@ViralBShah
ViralBShah enabled auto-merge (squash) November 13, 2026 13:28
@ViralBShah
ViralBShah merged commit 1f3f5d3 into main Nov 13, 2026
10 checks passed
@ViralBShah
ViralBShah deleted the vs/concat-specializations-order branch November 13, 2026 13:31
@codecov

codecov Bot commented Nov 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.97%. Comparing base (b087844) to head (c3815bd).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1171   +/-   ##
=======================================
  Coverage   98.97%   98.97%           
=======================================
  Files          16       16           
  Lines       10748    10748           
=======================================
  Hits        10638    10638           
  Misses        110      110           

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

ViralBShah added a commit that referenced this pull request Nov 13, 2026
- [x] #1167
- [x] #1169
- [x] #1166
- [x] #1165
- [x] #1161
- [x] #1168
- [x] #1163
- [x] #1171
- [x] #1143
- [x] #1164

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Stefan Karpinski <stefan@karpinski.org>
Co-authored-by: Viral B. Shah <ViralBShah@users.noreply.github.com>
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