From 5fac40495984b6ee51270e41a8f3ac34389d2d2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Fri, 12 Apr 2024 19:51:18 +0200 Subject: [PATCH] Use banner showing code from AbstractAlgebra (#1714) --- Project.toml | 2 +- src/Nemo.jl | 23 +---------------------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/Project.toml b/Project.toml index 6c41c3d61..2ac7fb03d 100644 --- a/Project.toml +++ b/Project.toml @@ -16,7 +16,7 @@ RandomExtensions = "fb686558-2515-59ef-acaa-46db3789a887" SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce" [compat] -AbstractAlgebra = "0.40.0" +AbstractAlgebra = "0.40.8" Antic_jll = "~0.201.500" Arb_jll = "~200.2300.000" Calcium_jll = "~0.401.100" diff --git a/src/Nemo.jl b/src/Nemo.jl index b74a2c557..cbdfddc91 100644 --- a/src/Nemo.jl +++ b/src/Nemo.jl @@ -353,28 +353,7 @@ function __init__() ccall((:flint_set_abort, libflint), Nothing, (Ptr{Nothing},), @cfunction(flint_abort, Nothing, ())) - # Check if were loaded from another package - # if VERSION < 1.7.*, only the "other" package will have the - # _tryrequire_from_serialized in the backtrace. - # if VERSION >= 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 and --banner flag - allowbanner = Base.JLOptions().banner != 0 - - if allowbanner && isinteractive_manual && isinteractive() && - !any(x -> x.name in ("Hecke", "Oscar", "Singular"), keys(Base.package_locks)) && - get(ENV, "NEMO_PRINT_BANNER", "true") != "false" - + if AbstractAlgebra.should_show_banner() && get(ENV, "NEMO_PRINT_BANNER", "true") != "false" println("") println("Welcome to Nemo version $(version())") println("")