Loading modules
Function Base.require
is responsible for loading modules and managing the pre-compilation cache. This is an implementation of the import
operator.
Experimental functions
The functions described below are experimental and are not included in the stable version of the Julia API. Before usage them for assembly, please specify what their current status is and whether they may change in the near future.
Package Loading Callbacks
To track the packages loaded by the Base.require
function, you can register a callback.
loaded_packages = Base.PkgId[]
callback = (pkg::Base.PkgId) -> push!(loaded_packages, pkg)
push!(Base.package_callbacks, callback)
It will look something like this:
julia> using Example
julia> loaded_packages
1-element Vector{Base.PkgId}:
Example [7876af07-990d-54b4-ab0e-23690620f79a]