Canonical way to get a list of all stdibs

What is the best way to get this vector?

stdlibs = [
    :ArgTools,
    :Artifacts,
    :Base64,
    :CRC32c,
    :CompilerSupportLibraries_jll,
    :Dates,
    :Distributed,
    :Downloads,
    :FileWatching,
    :Future,
    :GMP_jll,
    :InteractiveUtils,
    :LLD_jll,
    :LLVMLibUnwind_jll,
    :LazyArtifacts,
    :LibCURL,
    :LibCURL_jll,
    :LibGit2,
    :LibGit2_jll,
    :LibSSH2_jll,
    :LibUV_jll,
    :LibUnwind_jll,
    :Libdl,
    :LinearAlgebra,
    :Logging,
    :MPFR_jll,
    :Makefile,
    :Markdown,
    :MbedTLS_jll,
    :Mmap,
    :MozillaCACerts_jll,
    :NetworkOptions,
    :OpenBLAS_jll,
    :OpenLibm_jll,
    :PCRE2_jll,
    :Pkg,
    :Printf,
    :Profile,
    :REPL,
    :Random,
    :SHA,
    :Serialization,
    :SharedArrays,
    :Sockets,
    :SparseArrays,
    :Statistics,
    :SuiteSparse,
    :SuiteSparse_jll,
    :TOML,
    :Tar,
    :Test,
    :UUIDs,
    :Unicode,
    :Zlib_jll,
    :dSFMT_jll,
    :libLLVM_jll,
    :libblastrampoline_jll,
    :nghttp2_jll,
    :p7zip_jll]

Pkg.Types.get_last_stdlibs(VERSION) (or Symbol.(first.(values(Pkg.Types.get_last_stdlibs(VERSION)))) if only want those symbols) but this is internal Pkg API amenable to be broken at any point, use at your own risk.

2 Likes

Thanks! That’s good but not ideal.

What would be ideal exactly?

A single, documented function call or global constant that will keep working for all of 1.x would be ideal.

2 Likes

Most of Pkg functions are undocumented and non-public :person_shrugging: but if you need that in Julia Base, it shouldn’t be a problem.

1 Like