I tried to get the versions of Packages loaded by an app created with PackageCompiler.jl, but
using Pkg
function julia_main()::Cint
Pkg.status()
return 0
end
gives
Project OCTOPOS_DASH v0.0.0
Status `~/.julia/dev/OCTOPOS/dashapp/share/julia/Project.toml`
IOError: readdir("~/.julia/dev/OCTOPOS/dashapp/share/julia/stdlib/v1.7"): no such file or directory (ENOENT)
Maybe I'm misunderstanding the question, but isn't this expected? PackageCompiler essentially creates a new sysimage where the packages in the sysimage are like standard libraries, so similar to how you can't get a version for Statistics
in base Julia you can't get a version for packages in a sysimage if I understand correctly?
On master this information is stored: https://github.com/JuliaLang/julia/pull/44318
Probably you can embed the output when precompiling though, something like
status_str = begin
io = IOBuffer();
Pkg.status(; io=io)
String(take!(io))
end
Last updated: Nov 06 2024 at 04:40 UTC