From 878d42abf05089a5aba6e7c6302e04121c5e0478 Mon Sep 17 00:00:00 2001 From: t-bltg Date: Thu, 26 Jan 2023 17:36:51 +0100 Subject: [PATCH 1/2] fix warning --- src/backends.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backends.jl b/src/backends.jl index 51e7c37bc..d3abf53b2 100644 --- a/src/backends.jl +++ b/src/backends.jl @@ -29,7 +29,7 @@ function _check_installed(backend::Union{Module,AbstractString,Symbol}; warn = t return end # check installed - version = if (pkg_id = Base.identify_package(str)) === nothing + version = if (pkg_id = Base.identify_package(Plots, str)) === nothing nothing else get(Pkg.dependencies(), pkg_id.uuid, (; version = nothing)).version From b0df12f020192ba068f42402b0f6f7cf74af79b2 Mon Sep 17 00:00:00 2001 From: t-bltg Date: Thu, 26 Jan 2023 18:45:03 +0100 Subject: [PATCH 2/2] fix CI --- src/backends.jl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/backends.jl b/src/backends.jl index d3abf53b2..67e302e48 100644 --- a/src/backends.jl +++ b/src/backends.jl @@ -29,7 +29,13 @@ function _check_installed(backend::Union{Module,AbstractString,Symbol}; warn = t return end # check installed - version = if (pkg_id = Base.identify_package(Plots, str)) === nothing + pkg_id = if str == "GR" + # FIXME: remove in `Plots2.0` (`GR` won't be a hard Plots dependency anymore). + Base.identify_package(Plots, str) # GR can be in the Manifest or in the Project + else + Base.identify_package(str) # a Project dependency + end + version = if pkg_id === nothing nothing else get(Pkg.dependencies(), pkg_id.uuid, (; version = nothing)).version