Hi!
I developed a first package JMtk15
and now would like to use those functions in a second package JMTools
. That first package appears to be loading correctly because
- the command
using JMtk15
does not generate any error messages, - the JMtk15 package appears in the
Project.toml
ofJMTools
as expected, and - a
const
definition inJMtk15
is correctly retrieved:
julia> using JMTools
julia> using JMtk15
julia> JMtk15_src
"/Users/michel/Projects/MISR/MISR_Toolkit.1.5/JMtk15/src/"
However, when I call one of the JMtk15
functions, I get error messages:
julia> misr_path = 168
168
julia> misr_orbit = 68050
68050
julia> bool = is_from_misr_path(misr_path, misr_orbit)
ERROR: UndefVarError: jMtkOrbitToPath not defined
Stacktrace:
[1] is_from_misr_path(misr_path::Int64, misr_orbit::Int64)
@ JMTools ~/Projects/MISR/MISR_Tools/JMTools/src/is_from_misr_path.jl:57
[2] top-level scope
@ REPL[6]:1
julia> bool = is_from_misr_path(misr_path, misr_orbit)
ERROR: UndefVarError: JMtk15 not defined
Stacktrace:
[1] is_from_misr_path(misr_path::Int64, misr_orbit::Int64)
@ JMTools ~/Projects/MISR/MISR_Tools/JMTools/src/is_from_misr_path.jl:57
[2] top-level scope
@ REPL[6]:1
where the first error message was generated by the code line 57
true_path = jMtkOrbitToPath(misr_orbit)
while the second error message was generated by the code line 57
true_path = JMtk15.jMtkOrbitToPath(misr_orbit)
That function is explicitly exported in JMtk15.jl
.
So it looks like I am either missing a step or an instruction to make the functions of the local package JMtk15
actually usable in the new local project JMTools
.
However, I also found out (1) that although the source of JMtk15
is located in a regular directory /Users/michel/Projects/MISR/MISR_Toolkit.1.5/JMtk15
, Julia appears to load packages from a different location:
julia> pkgdir(JMtk15)
"/Users/michel/.julia/packages/JMtk15/hCUhn"
and (2) that the directory .julia/packages/JMTk15
contains two oddly named subdirectories, each containing what looks like copies of the source code of JMtk15
:
MicMac3 ~/.julia/packages/JMTk15 % ls -al
total 0
drwxr-xr-x@ 4 michel staff 128 May 2 10:27 .
drwxr-xr-x 36 michel staff 1152 Apr 28 16:59 ..
drwx------@ 11 michel staff 352 Apr 28 16:59 9eq0g
drwx------@ 11 michel staff 352 May 2 10:27 hCUhn
What is the role of those copies in .julia/packages/JMTk15
? When do they get created and what is their purpose? Do I need to keep multiple copies (here 3: the working directory and two copies in .julia/packages/
) of the package source files?
Any help will be greatly appreciated.