In the following example:
julia> module M
using DataStructures
end
Main.M
julia> names(Main.M, all=true, imported=true)
5-element Array{Symbol,1}:
Symbol("#eval")
Symbol("#include")
:M
:eval
:include
we see that names
does not list the names of the modules (in this case DataStructures
) imported by a module (in our case Main.M
) if they are not exported. My question is how to get a list of modules imported by a given module.
An additional question would be how to check what is the source of such a module (note that using e.g. Pkg.dependencies
is not enough for it as the module might have been loaded first and then an active environment of the Julia session might have changed). If the second question does not have a good answer in general then it is enough for me to do this check against a UUID and a version of a package that comes from a global registry of Julia packages.
Thank you!