# Publishing package

**URL:** <https://discourse.julialang.org/t/publishing-package/67107>\
**Category:** New to Julia\
**Created:** [August 27, 2021, 3:30pm UTC](https://discourse.julialang.org/t/publishing-package/67107 "2021-08-27T15:30:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jakub\_Mitura](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jakub_mitura/32/19496_2.png) [@Jakub\_Mitura](https://discourse.julialang.org/u/Jakub_Mitura)\
**Post date:** [August 27, 2021, 3:30pm UTC](https://discourse.julialang.org/t/publishing-package/67107/1 "2021-08-27T15:30:01Z")

</div>

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

```julia
Package NuclearMedEye does not have BasicStructs in its dependencies

```

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

```julia

module DataStructs

include(joinpath("BasicStructs.jl"))

using Parameters, BasicStructs ....

```

and BasicStructs.jl looks like below

```julia
module BasicStructs

using Parameters

export ImageConstants

```

Thanks for Help !

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [August 27, 2021, 3:44pm UTC](https://discourse.julialang.org/t/publishing-package/67107/2 "2021-08-27T15:44:22Z")

</div>

Perhaps an example might help you? Here is one of my packages: [https://github.com/PetrKryslUCSD/Elfel.jl/tree/master/src](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](https://github.com/PetrKryslUCSD/Elfel.jl/blob/master/src/FESpaces.jl)  
to see how the submodules are accessed.
