sessionInfo() in Julia

A good practice for reproducible research and code is to report the session information. I believe there should be a better and more complete solution especially relying on Revise.jl and hopefully is something implemented in Pkg3. My patch up version is

using Pkg
function sessioninfo()
    println("Julia " * string(VERSION))
    for (key, version) ∈ sort(collect(Pkg.installed()))
        try
            isa(eval(Symbol(key)), Module) && println(key * " " * string(version))
        end
    end
end

The Pkg3 Manifest.toml file contains all packages for the project and what versions they are installed at. And if someone gives you a Project.toml + Manifest.toml you can “instantiate” that exact environment.

2 Likes