From 95e6c1b6021433f4edd7d7dfc0d364c967b96097 Mon Sep 17 00:00:00 2001 From: Aayush Sabharwal Date: Fri, 20 Oct 2023 22:21:10 +0530 Subject: [PATCH] fix: conditional import in extensions --- ext/SymbolicIndexingInterfaceSymbolicUtilsExt.jl | 7 ++++++- ext/SymbolicIndexingInterfaceSymbolicsExt.jl | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ext/SymbolicIndexingInterfaceSymbolicUtilsExt.jl b/ext/SymbolicIndexingInterfaceSymbolicUtilsExt.jl index ea70316a..df48aa34 100644 --- a/ext/SymbolicIndexingInterfaceSymbolicUtilsExt.jl +++ b/ext/SymbolicIndexingInterfaceSymbolicUtilsExt.jl @@ -1,6 +1,11 @@ module SymbolicIndexingInterfaceSymbolicUtilsExt -using SymbolicIndexingInterface, SymbolicUtils +using SymbolicIndexingInterface +@static if isdefined(Base, :get_extension) + using SymbolicUtils +else + using ..SymbolicUtils +end SymbolicIndexingInterface.issymbolic(::Type{<:SymbolicUtils.BasicSymbolic}) = Symbolic() diff --git a/ext/SymbolicIndexingInterfaceSymbolicsExt.jl b/ext/SymbolicIndexingInterfaceSymbolicsExt.jl index dd767a95..f8acbbfa 100644 --- a/ext/SymbolicIndexingInterfaceSymbolicsExt.jl +++ b/ext/SymbolicIndexingInterfaceSymbolicsExt.jl @@ -1,6 +1,12 @@ module SymbolicIndexingInterfaceSymbolicsExt -using SymbolicIndexingInterface, Symbolics +using SymbolicIndexingInterface + +@static if isdefined(Base, :get_extension) + using Symbolics +else + using ..Symbolics +end SymbolicIndexingInterface.issymbolic(::Type{<:Symbolics.Num}) = Symbolic()