Skip to content

Commit

Permalink
Overload issparse for Julia v1.10 compatibality (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlfivefifty authored Dec 15, 2023
1 parent c983e63 commit 5dcc0dc
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
deps/deps.jl
.DS_Store
Manifest.toml
.vscode/settings.json
13 changes: 11 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
name = "QuasiArrays"
uuid = "c4ea9172-b204-11e9-377d-29865faadc5c"
authors = ["Sheehan Olver <[email protected]>"]
version = "0.11.3"
version = "0.11.4"

[deps]
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
DomainSets = "5b8099bc-c8ec-5219-889f-1d9e522a28bf"
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
LazyArrays = "5078a376-72f3-5289-bfd5-ec5146d43c02"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"

[weakdeps]
SparseArrays = "90137ffa-7385-5640-81b9-e52037218182"

[extensions]
QuasiArraysSparseArraysExt = "SparseArrays"


[compat]
ArrayLayouts = "1"
DomainSets = "0.6, 0.7"
Expand All @@ -23,7 +31,8 @@ julia = "1.6"
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Base64", "IntervalSets", "Random", "Test"]
test = ["Base64", "IntervalSets", "Random", "SparseArrays", "Test"]
7 changes: 7 additions & 0 deletions ext/QuasiArraysSparseArraysExt.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module QuasiArraysSparseArraysExt

using QuasiArrays, SparseArrays

SparseArrays.issparse(::AbstractQuasiArray) = false

end
5 changes: 5 additions & 0 deletions src/QuasiArrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,9 @@ function isapprox(x::AbstractQuasiArray, y::AbstractQuasiArray;
end
end

if !isdefined(Base, :get_extension)
include("../ext/QuasiArraysSparseArraysExt.jl")
end


end
4 changes: 3 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ include("test_quasiconcat.jl")
include("test_quasikron.jl")

include("test_ldiv.jl")
include("test_quasilazy.jl")
include("test_quasilazy.jl")

include("test_sparsequasi.jl")
5 changes: 5 additions & 0 deletions test/test_sparsequasi.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
using QuasiArrays, SparseArrays

@testset "sparse" begin
@test !issparse(Inclusion([0,1]))
end

2 comments on commit 5dcc0dc

@dlfivefifty
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error while trying to register: Error in (Julia)Project.toml: UUID 90137ffa-7385-5640-81b9-e52037218182 refers to package 'StaticArrays' in registry but Project.toml has 'SparseArrays'

Please sign in to comment.