diff --git a/src/Krylov.jl b/src/Krylov.jl index 1b57f5caa..73c1dc7b6 100644 --- a/src/Krylov.jl +++ b/src/Krylov.jl @@ -2,6 +2,10 @@ module Krylov using LinearAlgebra, SparseArrays, Printf +@static if !isdefined(Base, :get_extension) + using Requires +end + include("krylov_utils.jl") include("krylov_stats.jl") include("krylov_solvers.jl") @@ -53,10 +57,8 @@ include("craigmr.jl") include("krylov_solve.jl") -# This symbol is only defined on Julia versions that support extensions -@static if !isdefined(Base, :get_extension) - using Requires - function __init__() +function __init__() + @static if !isdefined(Base, :get_extension) @require StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" include("../ext/KrylovStaticArraysExt.jl") end end