From 03ed23db2adc6204b892ddb6d1be095bd7f70512 Mon Sep 17 00:00:00 2001 From: Simon Christ Date: Thu, 10 Mar 2022 21:41:20 +0100 Subject: [PATCH] handle backends without compat entry --- src/Plots.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Plots.jl b/src/Plots.jl index 0f4abd41..e32223a7 100644 --- a/src/Plots.jl +++ b/src/Plots.jl @@ -13,8 +13,12 @@ const _plots_project = Pkg.Types.read_project(normpath(@__DIR__, "..", "Project. const _current_plots_version = _plots_project.version const _plots_compats = _plots_project.compat function _check_compat(sim::Module) + sim_str = string(sim) + if !haskey(_plots_compats, sim_str) + return nothing + end be_v = Pkg.Types.read_project(joinpath(Base.pkgdir(sim), "Project.toml")).version - be_c = _plots_compats[string(sim)] + be_c = _plots_compats[sim_str] if isempty(intersect(be_v, be_c.val)) @warn "$sim $be_v is not compatible with this version of Plots. The declared compatibility is $(be_c.str)." end