Skip to content

Commit 62c9f34

Browse files
devmotionjishnub
andauthored
Drop support for Julia < 1.10 (#419)
Continued from #397. In addition to #397, the PR cleans `VERSION` branches and updates CI. --------- Co-authored-by: Jishnu Bhattacharya <[email protected]>
1 parent f160c66 commit 62c9f34

File tree

5 files changed

+22
-67
lines changed

5 files changed

+22
-67
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,25 @@ jobs:
3232
test:
3333
needs: pre_job
3434
if: needs.pre_job.outputs.should_skip != 'true'
35-
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
35+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ github.event_name }}
3636
runs-on: ${{ matrix.os }}
3737
strategy:
3838
fail-fast: false
3939
matrix:
4040
version:
41+
- 'min'
4142
- 'lts'
4243
- '1'
4344
- 'pre'
4445
os:
4546
- ubuntu-latest
4647
- macOS-latest
4748
- windows-latest
48-
arch:
49-
- x64
5049
steps:
5150
- uses: actions/checkout@v5
5251
- uses: julia-actions/setup-julia@v2
5352
with:
5453
version: ${{ matrix.version }}
55-
arch: ${{ matrix.arch }}
5654
- uses: julia-actions/cache@v2
5755
- uses: julia-actions/julia-buildpkg@v1
5856
- uses: julia-actions/julia-runtest@v1

Project.toml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
name = "FillArrays"
22
uuid = "1a297f60-69ca-5386-bcde-b61e274b549b"
3-
version = "1.14.0"
3+
version = "1.15.0"
44

55
[deps]
66
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
7-
PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150"
8-
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
9-
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
107

118
[weakdeps]
129
PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150"
@@ -22,16 +19,16 @@ FillArraysStatisticsExt = "Statistics"
2219
Aqua = "0.8"
2320
Documenter = "1"
2421
Infinities = "0.1"
25-
LinearAlgebra = "1.6"
22+
LinearAlgebra = "1"
2623
PDMats = "0.11.17"
2724
Quaternions = "0.7"
28-
Random = "1.6"
25+
Random = "1"
2926
ReverseDiff = "1"
30-
SparseArrays = "1.6"
27+
SparseArrays = "1"
3128
StaticArrays = "1"
32-
Statistics = "1.6"
33-
Test = "1.6"
34-
julia = "1.6"
29+
Statistics = "1"
30+
Test = "1"
31+
julia = "1.10"
3532

3633
[extras]
3734
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"

ext/FillArraysSparseArraysExt.jl

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,6 @@ end
6161
@deprecate kron(E1::RectDiagonalFill, E2::RectDiagonalFill) kron(sparse(E1), sparse(E2))
6262

6363
# Ambiguity. see #178
64-
if VERSION >= v"1.8"
65-
dot(x::AbstractFillVector, y::SparseVectorUnion) = _fill_dot(x, y)
66-
else
67-
dot(x::AbstractFillVector{<:Number}, y::SparseVectorUnion{<:Number}) = _fill_dot(x, y)
68-
end
69-
64+
dot(x::AbstractFillVector, y::SparseVectorUnion) = _fill_dot(x, y)
7065

7166
end # module

src/FillArrays.jl

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,10 @@ ishermitian(F::AbstractFillMatrix) = axes(F,1) == axes(F,2) && (isempty(F) || is
7272
Base.IteratorSize(::Type{<:AbstractFill{T,N,Axes}}) where {T,N,Axes} = _IteratorSize(Axes)
7373
_IteratorSize(::Type{Tuple{}}) = Base.HasShape{0}()
7474
_IteratorSize(::Type{Tuple{T}}) where {T} = Base.IteratorSize(T)
75-
# Julia Base has an optimized any for Tuples on versions >= v1.9
76-
# On lower versions, a recursive implementation helps with type-inference
77-
if VERSION >= v"1.9.0-beta3"
78-
_any(f, t::Tuple) = any(f, t)
79-
else
80-
_any(f, ::Tuple{}) = false
81-
_any(f, t::Tuple) = f(t[1]) || _any(f, Base.tail(t))
82-
end
8375
function _IteratorSize(::Type{T}) where {T<:Tuple}
8476
N = fieldcount(T)
8577
s = ntuple(i-> Base.IteratorSize(fieldtype(T, i)), N)
86-
_any(x -> x isa Base.IsInfinite, s) ? Base.IsInfinite() : Base.HasShape{N}()
78+
any(x -> x isa Base.IsInfinite, s) ? Base.IsInfinite() : Base.HasShape{N}()
8779
end
8880

8981

@@ -738,12 +730,6 @@ include("fillalgebra.jl")
738730
include("fillbroadcast.jl")
739731
include("trues.jl")
740732

741-
if !isdefined(Base, :get_extension)
742-
include("../ext/FillArraysPDMatsExt.jl")
743-
include("../ext/FillArraysSparseArraysExt.jl")
744-
include("../ext/FillArraysStatisticsExt.jl")
745-
end
746-
747733
##
748734
# print
749735
##
@@ -752,15 +738,9 @@ Base.replace_in_print_matrix(::AbstractZeros, ::Integer, ::Integer, s::AbstractS
752738

753739
# following support blocked fill array printing via
754740
# BlockArrays.jl
755-
if VERSION < v"1.8-"
756-
axes_print_matrix_row(lay, io, X, A, i, cols, sep) =
757-
Base.invoke(Base.print_matrix_row, Tuple{IO,AbstractVecOrMat,Vector,Integer,AbstractVector,AbstractString},
758-
io, X, A, i, cols, sep)
759-
else
760-
axes_print_matrix_row(lay, io, X, A, i, cols, sep, idxlast::Integer=last(axes(X, 2))) =
761-
Base.invoke(Base.print_matrix_row, Tuple{IO,AbstractVecOrMat,Vector,Integer,AbstractVector,AbstractString,Integer},
741+
axes_print_matrix_row(lay, io, X, A, i, cols, sep, idxlast::Integer=last(axes(X, 2))) =
742+
Base.invoke(Base.print_matrix_row, Tuple{IO,AbstractVecOrMat,Vector,Integer,AbstractVector,AbstractString,Integer},
762743
io, X, A, i, cols, sep, idxlast)
763-
end
764744

765745
Base.print_matrix_row(io::IO,
766746
X::Union{AbstractFillVector,

test/runtests.jl

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -407,15 +407,12 @@ function test_addition_subtraction_dot(As, Bs, Tout::Type)
407407
@test @inferred(B - A) isa Tout{promote_type(eltype(B), eltype(A))}
408408
@test isapprox_or_undef(as_array(B - A), as_array(B) - as_array(A))
409409

410-
# Julia 1.6 doesn't support dot(UniformScaling)
411-
if VERSION < v"1.6.0" || VERSION >= v"1.8.0"
412-
d1 = dot(A, B)
413-
d2 = dot(as_array(A), as_array(B))
414-
d3 = dot(B, A)
415-
d4 = dot(as_array(B), as_array(A))
416-
@test d1 d2 || d1 d2
417-
@test d3 d4 || d3 d4
418-
end
410+
d1 = dot(A, B)
411+
d2 = dot(as_array(A), as_array(B))
412+
d3 = dot(B, A)
413+
d4 = dot(as_array(B), as_array(A))
414+
@test d1 d2 || d1 d2
415+
@test d3 d4 || d3 d4
419416
end
420417
end
421418
end
@@ -1931,9 +1928,7 @@ end
19311928
E = Eye(2)
19321929
K = kron(E, E)
19331930
@test K isa Diagonal
1934-
if VERSION >= v"1.9"
1935-
@test K isa typeof(E)
1936-
end
1931+
@test K isa typeof(E)
19371932
C = collect(E)
19381933
@test K == kron(C, C)
19391934

@@ -2790,11 +2785,7 @@ end
27902785
)
27912786
O = OneElement(v,ind,sz)
27922787
A = Array(O)
2793-
if VERSION >= v"1.10"
2794-
@test @inferred(sum(O)) === sum(A)
2795-
else
2796-
@test @inferred(sum(O)) == sum(A)
2797-
end
2788+
@test @inferred(sum(O)) === sum(A)
27982789
@test @inferred(sum(O, init=zero(eltype(O)))) === sum(A, init=zero(eltype(O)))
27992790
@test @inferred(sum(x->1, O, init=0)) === sum(Fill(1, axes(O)), init=0)
28002791
end
@@ -2949,13 +2940,7 @@ end
29492940
end
29502941

29512942
@testset "structured matrix" begin
2952-
# strange bug on Julia v1.6, see
2953-
# https://discourse.julialang.org/t/strange-seemingly-out-of-bounds-access-bug-in-julia-v1-6/101041
2954-
bands = if VERSION >= v"1.9"
2955-
((Fill(2,3), Fill(6,2)), (Zeros(3), Zeros(2)))
2956-
else
2957-
((Fill(2,3), Fill(6,2)),)
2958-
end
2943+
bands = ((Fill(2,3), Fill(6,2)), (Zeros(3), Zeros(2)))
29592944
@testset for (dv, ev) in bands
29602945
for D in (Diagonal(dv), Bidiagonal(dv, ev, :U),
29612946
Tridiagonal(ev, dv, ev), SymTridiagonal(dv, ev))

0 commit comments

Comments
 (0)