From 8288d5dfc550787b0c627841b49a7a49814da50d Mon Sep 17 00:00:00 2001 From: Philip Bittihn <philip.bittihn@ds.mpg.de> Date: Mon, 12 Sep 2022 09:42:55 +0200 Subject: [PATCH] Warn if InPartS legacy is also loaded --- src/InPartS.jl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/InPartS.jl b/src/InPartS.jl index 6abd416..698bb3e 100644 --- a/src/InPartS.jl +++ b/src/InPartS.jl @@ -189,6 +189,12 @@ function __init__() @info "InPartS: JLD2 export enabled" end + # Use Requires infrastructure to warn if legacy version is ever loaded simultaneously + legacyInPartS = Base.PkgId(Base.UUID("385f2a1c-27df-41b8-9918-2c5d735168af"), "InPartS") + Requires.listenpkg(legacyInPartS) do + @warn "The legacy version of InPartS was loaded alongside the current, public version. This will cause unexpected behavior." + end + return end -- GitLab