From b34f8b87c192231b9f8b8a6308342403f65a5954 Mon Sep 17 00:00:00 2001 From: Simon Christ Date: Tue, 1 Mar 2022 09:23:10 +0100 Subject: [PATCH] check loaded_modules instead of Main for warnings about StatsPlots recipes (#4123) * check loaded_modules instead of Main * format --- src/args.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/args.jl b/src/args.jl index 98236b07..93a1b7b7 100644 --- a/src/args.jl +++ b/src/args.jl @@ -1585,7 +1585,11 @@ function RecipesPipeline.preprocess_attributes!(plotattributes::AKW) # warnings for moved recipes st = get(plotattributes, :seriestype, :path) - if st in (:boxplot, :violin, :density) && !isdefined(Main, :StatsPlots) + if st in (:boxplot, :violin, :density) && + !haskey( + Base.loaded_modules, + Base.PkgId(Base.UUID("f3b207a7-027a-5e70-b257-86293d7955fd"), "StatsPlots"), + ) @warn( "seriestype $st has been moved to StatsPlots. To use: \`Pkg.add(\"StatsPlots\"); using StatsPlots\`" )