Skip to content

Commit fac461d

Browse files
authored
Use Base.pkgversion instead of getting a hold of Pkg. (#488)
1 parent 03af758 commit fac461d

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/utils.jl

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
11

22
function versioninfo(io::IO=stdout)
3-
# get a hold of Pkg without adding a dependency on the package
4-
Pkg = let
5-
id = Base.PkgId(Base.UUID("44cfe95a-1eb2-52ea-b672-e2afdf69b78f"), "Pkg")
6-
Base.loaded_modules[id]
7-
end
8-
deps = Pkg.dependencies()
9-
versions = Dict(map(uuid->deps[uuid].name => deps[uuid].version, collect(keys(deps))))
10-
113
if Sys.islinux()
124
println(io, "Binary dependencies:")
135
for jll in [oneL0.NEO_jll, oneL0.NEO_jll.libigc_jll, oneL0.NEO_jll.gmmlib_jll,
146
SPIRV_LLVM_Translator_unified_jll, SPIRV_Tools_jll]
157
name = string(jll)
16-
print(io, "- $(name[1:end-4]): $(versions[name])")
8+
print(io, "- $(name[1:end-4]): $(Base.pkgversion(jll))")
179
if jll.host_platform !== nothing
1810
debug = tryparse(Bool, get(jll.host_platform.tags, "debug", "false"))
1911
if debug === true

0 commit comments

Comments
 (0)