Publishing package

Hello I am preparing the packege to get published I have a lot of files and modules, till now I hade file with bunch of include statements - executed once via repl ; then in all modules I referenced other (for example some modules with utils ) via syntax Main. for example using Main.ModernGlUtilNow I in order to publish it I moved all include files into the file with name the same as package name and inside I have this bunch of the include statements like include(joinpath(“src”,“display”,“GLFW”,“startModules”,“ModernGlUtil.jl”))
And now my question in order to be be able to reference module ModernGlUtil in module ReactOnKeyboard where both of them are not main modules how to reference module ModernGlUtiltill now I did

module ReactOnKeyboard
using Main.ModernGlUtil ...

should I change to

module ReactOnKeyboard
using ModernGlUtil ...

Or even write include every time the module is used (not only in main module)

module ReactOnKeyboard
include(joinpath("src","display","GLFW","startModules","ModernGlUtil.jl"))
using ModernGlUtil ...

Additionally when I invoke my main module

using NuclearMedEye

I get error

Package NuclearMedEye does not have BasicStructs in its dependencies

error points to the definition of one of my modules that is defined as below



module DataStructs

include(joinpath("BasicStructs.jl"))

using Parameters, BasicStructs ....

and BasicStructs.jl looks like below

module BasicStructs

using Parameters

export ImageConstants

Thanks for Help !

Perhaps an example might help you? Here is one of my packages: https://github.com/PetrKryslUCSD/Elfel.jl/tree/master/src
Elfel is obviously the top module. Look for instance at
https://github.com/PetrKryslUCSD/Elfel.jl/blob/master/src/FESpaces.jl
to see how the submodules are accessed.

4 Likes