Skip to content

Commit e3d9b32

Browse files
authored
Simplify versioninfo() and report more packages. (#429)
1 parent 1f46889 commit e3d9b32

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

src/Metal.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ using ObjectFile
1212
using ExprTools: splitdef, combinedef
1313
using Artifacts
1414
using ObjectiveC, .CoreFoundation, .Foundation, .Dispatch, .OS
15+
import KernelAbstractions
1516

1617
include("version.jl")
1718

src/utilities.jl

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,11 @@ function versioninfo(io::IO=stdout)
2323
println(io)
2424

2525
println(io, "Julia packages: ")
26-
## get a hold of Pkg without adding a dependency on the package
27-
Pkg = let
28-
id = Base.PkgId(Base.UUID("44cfe95a-1eb2-52ea-b672-e2afdf69b78f"), "Pkg")
29-
Base.loaded_modules[id]
30-
end
31-
## look at the Project.toml to determine our version
32-
project = Pkg.Operations.read_project(Pkg.Types.projectfile_path(pkgdir(Metal)))
33-
println(io, "- Metal.jl: $(project.version)")
34-
## dependencies
35-
deps = Pkg.dependencies()
36-
versions = Dict(map(uuid->deps[uuid].name => deps[uuid].version, collect(keys(deps))))
37-
for dep in ["LLVMDowngrader_jll"]
38-
println(io, "- $dep: $(versions[dep])")
26+
println(io, "- Metal.jl: $(Base.pkgversion(Metal))")
27+
for name in [:GPUArrays, :GPUCompiler, :KernelAbstractions, :ObjectiveC,
28+
:LLVM, :LLVMDowngrader_jll]
29+
mod = getfield(Metal, name)
30+
println(io, "- $(name): $(Base.pkgversion(mod))")
3931
end
4032
println(io)
4133

0 commit comments

Comments
 (0)