From e49f3023f2fd13a3d0cb848cf4ee1ae60acc783f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Helmut=20H=C3=A4nsel?= Date: Fri, 3 May 2024 15:57:22 +0200 Subject: [PATCH] fix DataFrame extension for Julia 1.6 --- ext/StippleUIDataFramesExt.jl | 9 ++++----- src/StippleUI.jl | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ext/StippleUIDataFramesExt.jl b/ext/StippleUIDataFramesExt.jl index 100cd18f..b1cdc82b 100644 --- a/ext/StippleUIDataFramesExt.jl +++ b/ext/StippleUIDataFramesExt.jl @@ -1,10 +1,9 @@ module StippleUIDataFramesExt -@static if isdefined(Base, :get_extension) - using DataFrames - using StippleUI - using StippleUI.Stipple -end +using StippleUI +using StippleUI.Stipple + +isdefined(Base, :get_extension) ? (using DataFrames) : (using ..DataFrames) function StippleUI.Tables.DataTable() DataTable(DataFrames.DataFrame()) diff --git a/src/StippleUI.jl b/src/StippleUI.jl index 660129e6..08e25317 100644 --- a/src/StippleUI.jl +++ b/src/StippleUI.jl @@ -182,7 +182,7 @@ function __init__() @static if !isdefined(Base, :get_extension) @require DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" begin # evaluate the code of the extension without the surrounding module - include(joinpath(@__DIR__, "..", "ext", "StippleUIDataFrames.jl")) + include(joinpath(@__DIR__, "..", "ext", "StippleUIDataFramesExt.jl")) end end end