Hi!
I am trying to create a new system image with a package inside. I am building it with:
julia build_sysimg.jl /tmp/test core2 userimg.jl
in which userimg.jl contains:
using SatelliteToolbox
The image is build correctly, but, when I run Julia with julia -J /tmp/test.so and try to use my package, I get the error:
julia> using SatelliteToolbox
ERROR: ArgumentError: Package SatelliteToolbox not found in current path:
- Run `Pkg.add("SatelliteToolbox")` to install the SatelliteToolbox package.
Stacktrace:
[1] require(::Module, ::Symbol) at ./loading.jl:817
All the functions are available using SatelliteToolbox. like:
julia> SatelliteToolbox.igrf12(2012, 700, 0,0, Val{:geodetic})
3-element StaticArrays.SArray{Tuple{3},Float64,1,3}:
27528.815473061582
-2815.9294028897752
-15580.51499405477
using .SatelliteToolbox?
@KristofferC it works perfectly! Is it documented? Did I miss something?
using Foo means to detect the package UUID of Foo based on the LOAD_PATH (and project file in them) and then load the package with that uuid. Without having the package in the LOAD_PATH we can't know what UUID it has and thus can't load it.
using .Foo just means to bring the exports from the module Foo in out scope into this scope.
Not sure if this explanation is very good...
Most helpful comment
using Foomeans to detect the package UUID of Foo based on the LOAD_PATH (and project file in them) and then load the package with that uuid. Without having the package in the LOAD_PATH we can't know what UUID it has and thus can't load it.using .Foojust means to bring the exports from the moduleFooin out scope into this scope.Not sure if this explanation is very good...