Skip to content

Commit

Permalink
Simplify versioninfo() and report more packages. (#429)
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt authored Sep 24, 2024
1 parent 1f46889 commit e3d9b32
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
1 change: 1 addition & 0 deletions src/Metal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ using ObjectFile
using ExprTools: splitdef, combinedef
using Artifacts
using ObjectiveC, .CoreFoundation, .Foundation, .Dispatch, .OS
import KernelAbstractions

include("version.jl")

Expand Down
18 changes: 5 additions & 13 deletions src/utilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,11 @@ function versioninfo(io::IO=stdout)
println(io)

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

Expand Down

0 comments on commit e3d9b32

Please sign in to comment.