Base.require is responsible for loading modules and it also manages the precompilation cache. It is the implementation of theimport statement.
The features below are experimental and not part of the stable Julia API. Before building upon them inform yourself about the current thinking and whether they might change soon.
It is possible to listen to the packages loaded byBase.require, by registering a callback.
loaded_packages = Base.PkgId[]callback = (pkg::Base.PkgId) -> push!(loaded_packages, pkg)push!(Base.package_callbacks, callback)Using this would look something like:
julia> using Examplejulia> loaded_packages1-element Vector{Base.PkgId}: Example [7876af07-990d-54b4-ab0e-23690620f79a]Settings
This document was generated withDocumenter.jl version 1.16.0 onThursday 20 November 2025. Using Julia version 1.12.2.