diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml index 2222e33..3f73421 100644 --- a/.github/workflows/Test.yml +++ b/.github/workflows/Test.yml @@ -13,10 +13,6 @@ jobs: fail-fast: false matrix: version: - - '1.6' - - '1.7' - - '1.8' - - '1.9' - '1.10' - '1.11' - 'nightly' diff --git a/Project.toml b/Project.toml index d671747..53759df 100644 --- a/Project.toml +++ b/Project.toml @@ -4,7 +4,6 @@ version = "4.4.0" [deps] LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -Requires = "ae029012-a4dd-5104-9daa-d747884805df" [weakdeps] SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" @@ -15,9 +14,8 @@ AdaptSparseArraysExt = "SparseArrays" AdaptStaticArraysExt = "StaticArrays" [compat] -Requires = "1" StaticArrays = "1" -julia = "1.6" +julia = "1.10" LinearAlgebra = "1" SparseArrays = "1" diff --git a/ext/AdaptSparseArraysExt.jl b/ext/AdaptSparseArraysExt.jl index 09ee7d0..7112f3a 100644 --- a/ext/AdaptSparseArraysExt.jl +++ b/ext/AdaptSparseArraysExt.jl @@ -1,7 +1,7 @@ module AdaptSparseArraysExt using Adapt -isdefined(Base, :get_extension) ? (using SparseArrays) : (using ..SparseArrays) +using SparseArrays Adapt.adapt_storage(::Type{Array}, xs::SparseVector) = xs Adapt.adapt_storage(::Type{Array}, xs::SparseMatrixCSC) = xs diff --git a/ext/AdaptStaticArraysExt.jl b/ext/AdaptStaticArraysExt.jl index e33e74b..b0db775 100644 --- a/ext/AdaptStaticArraysExt.jl +++ b/ext/AdaptStaticArraysExt.jl @@ -1,7 +1,7 @@ module AdaptStaticArraysExt using Adapt -isdefined(Base, :get_extension) ? (using StaticArrays) : (using ..StaticArrays) +using StaticArrays Adapt.adapt_storage(::Type{<:SArray{S}}, xs::Array) where {S} = SArray{S}(xs) Adapt.adapt_storage(::Type{SArray}, xs::Array) = SArray{Tuple{size(xs)...}}(xs) diff --git a/src/Adapt.jl b/src/Adapt.jl index fe5f817..a3d5936 100644 --- a/src/Adapt.jl +++ b/src/Adapt.jl @@ -67,19 +67,5 @@ include("arrays.jl") # helpers include("macro.jl") -if !isdefined(Base, :get_extension) -using Requires -end - -@static if !isdefined(Base, :get_extension) -function __init__() - @require SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" begin - include("../ext/AdaptSparseArraysExt.jl") - end - @require StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" begin - include("../ext/AdaptStaticArraysExt.jl") - end -end -end end # module