Skip to content

Commit

Permalink
feat: add pre-1.9 compat using Requires
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSabharwal committed Oct 20, 2023
1 parent 423e611 commit 1fe9d57
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ uuid = "2efcf032-c050-4f8e-a9bb-153293bab1f5"
authors = ["Aayush Sabharwal <[email protected]> and contributors"]
version = "0.3.0"

[deps]
Requires = "ae029012-a4dd-5104-9daa-d747884805df"

[weakdeps]
SymbolicUtils = "d1185830-fcd6-423d-90d6-eec64667417b"
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
Expand All @@ -12,6 +15,7 @@ SymbolicIndexingInterfaceSymbolicUtilsExt = "SymbolicUtils"
SymbolicIndexingInterfaceSymbolicsExt = "Symbolics"

[compat]
Requires = "1.0"
SymbolicUtils = "1.4"
Symbolics = "5.10"
julia = "1"
Expand Down
7 changes: 7 additions & 0 deletions src/SymbolicIndexingInterface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ export issymbolic, isvariable, variableindex, isparameter, parameterindex,
isindependent_variable, isobserved, observed, istimedependent, constant_structure
include("interface.jl")

@static if !isdefined(Base, :get_extension)
using Requires
function __init__()
@require Symbolics="0c5d862f-8b57-4792-8d23-62f2024744c7" include("../ext/SymbolicIndexingInterfaceSymbolicsExt.jl")
@require SymbolicUtils="d1185830-fcd6-423d-90d6-eec64667417b" include("../ext/SymbolicIndexingInterfaceSymbolicUtilsExt.jl")

Check warning on line 14 in src/SymbolicIndexingInterface.jl

View check run for this annotation

Codecov / codecov/patch

src/SymbolicIndexingInterface.jl#L12-L14

Added lines #L12 - L14 were not covered by tests
end
end

end

0 comments on commit 1fe9d57

Please sign in to comment.