From 4a45ca4391f8a050737fe991104372533700a7c3 Mon Sep 17 00:00:00 2001 From: Jared Wahlstrand Date: Fri, 29 Jul 2022 02:04:44 -0400 Subject: [PATCH] fail in __init__() with error if Gtk4 was previously imported (#651) * fail in __init__() with error if Gtk4 was previously imported (prevents a crash) Also remove redundant tests that I introduced * run CI again --- src/Gtk.jl | 2 ++ test/runtests.jl | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Gtk.jl b/src/Gtk.jl index 3d8b4ded..16b7d042 100644 --- a/src/Gtk.jl +++ b/src/Gtk.jl @@ -77,6 +77,8 @@ include("gio.jl") include("application.jl") function __init__() + in(:Gtk4, names(Main, imported=true)) && error("Gtk is incompatible with Gtk4.") + # Set XDG_DATA_DIRS so that Gtk can find its icons and schemas ENV["XDG_DATA_DIRS"] = join(filter(x -> x !== nothing, [ dirname(adwaita_icons_dir), diff --git a/test/runtests.jl b/test/runtests.jl index 3b9917a3..bb838d94 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -7,6 +7,4 @@ include("gui.jl") include("list.jl") include("misc.jl") include("text.jl") -include("tree.jl") - end