From 3ebaede05ea4eea351030ddee4868dadc8d4ed22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Thu, 22 Aug 2024 12:15:43 +0200 Subject: [PATCH] Remove banner code and instead use `should_show_banner` --- Project.toml | 2 ++ src/GAP.jl | 23 +++-------------------- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/Project.toml b/Project.toml index 23907f9ee..ea2d46575 100644 --- a/Project.toml +++ b/Project.toml @@ -4,6 +4,7 @@ authors = ["Thomas Breuer ", "Sebastian Gutsche = 1.8, also doing 'using Package' will have - # _tryrequire_from_serialized the backtrace. - # - # To still distinguish both scenarios, notice that - # 'using OtherPackage' will either have _tryrequire_from_serialized at least twice, - # or one with four arguments (hence five as the function name is the first argument) - # 'using Package' serialized will have a version with less arguments - bt = Base.process_backtrace(Base.backtrace()) - filter!(sf -> sf[1].func === :_tryrequire_from_serialized, bt) - isinteractive_manual = - length(bt) == 0 || (length(bt) == 1 && length(only(bt)[1].linfo.specTypes.parameters) < 4) - - # Respect the -q flag - isquiet = Bool(Base.JLOptions().quiet) - - show_banner = !isquiet && isinteractive_manual && isinteractive() && - !any(x->x.name in ["Oscar"], keys(Base.package_locks)) && + show_banner = AbstractAlgebra.should_show_banner() && get(ENV, "GAP_PRINT_BANNER", "true") != "false" if !show_banner