I have developed an application that makes use of 20-odd modules. Coming from Matlab, I have ensured that Julia finds my code by adding relevant folders to the LOAD_PATH
. The user uses my application by using
relevant modules. The dependencies between my modules follows a (relatively complex) direct acyclic graph.
The time has come to package the code to make is distributable. I have the right folder structure, with /src
, /test
, Project.toml
and so on, and I “] dev
” the project.
Trouble appears when I zero the LOAD_PATH
: my primary module (which has the same name as the project) does not find the secondary modules (that are neatly stored in \src
).
Whence my questions:
- Can a package make more than one module available for
using
(by both the user and other parts of the package)? - Specificaly, is there a way, to make the package, on compilation, to add the relevant folder to the
LOAD_PATH
? Edit: for the purpose of making the secondary modules available. -
include
ing modules as submodules into the primary module and exporting them would be a way (with small API changes, no problem) to make secondary modules available to the user. I have not tested (lazy) but I am concerned that making a secondary module access another secondary in this way (through the primary module) creates a cycle in the dependency graph (the primary module uses or includes ‘all’ secondary modules), and so I can not quite see that working. - Am I persisting in unJulian ways, and must think one GIT repo==one package== one module, and boil things down to 3-4 packages with dependencies (some work for me to get my code there…)
Thank you in advance!