Skip to content

Commit b7859fa

Browse files
committed
pkgversion in jl 1.9
1 parent e31fbad commit b7859fa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/services/Serialization.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@ const TYPEKEY = "_type"
99
#NOTE fixed really bad function but kept similar as fallback #TODO upgrade to use pkgversion(m::Module)
1010
function _getDFGVersion()
1111

12+
if VERSION >= v"1.9"
13+
return pkgversion(DistributedFactorGraphs)
14+
end
15+
#TODO when we drop jl<1.9 remove the rest here
1216
pkgorigin = get(Base.pkgorigins, Base.PkgId(DistributedFactorGraphs), nothing)
13-
if !isnothing(pkgorigin)
17+
if !isnothing(pkgorigin) && !isnothing(pkgorigin.version)
1418
return pkgorigin.version
1519
end
1620
dep = get(Pkg.dependencies(), Base.UUID("b5cc3c7e-6572-11e9-2517-99fb8daf2f04"), nothing)

0 commit comments

Comments
 (0)