# Problem with referencing modules

**URL:** <https://discourse.julialang.org/t/problem-with-referencing-modules/100916>\
**Category:** New to Julia\
**Created:** [June 27, 2023, 9:36pm UTC](https://discourse.julialang.org/t/problem-with-referencing-modules/100916 "2023-06-27T21:36:46Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Post date:** [July 6, 2023, 10:41pm UTC](https://discourse.julialang.org/t/problem-with-referencing-modules/100916/22 "2023-07-06T22:41:32Z")

</div>

> [@jlhouchin](#):
>
> Candles
> 
> ```julia
> import ..TimeFrames
> using .TimeFrames
> import ..Prices
> using .Prices
> import ..CoreDates
> using .CoreDates
> 
> ```

I’m pretty sure the above snippet is equivalent to this:

```julia
using ..TimeFrames
using ..Prices
using ..CoreDates

```

Or you could do it in a single line, like `using ..TimeFrames, ..Prices, ..CoreDates`.

Note that, in my code, I prefer `import` to `using`, and I like to use fully qualified names; this is, however, just my stylistic preference. In fact, most Julia programmers seem to largely shy away from (sub)modules in their code.

---

<div class="post-metadata">

**Author:** ![jlhouchin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlhouchin/32/6179_2.png) [@jlhouchin](https://discourse.julialang.org/u/jlhouchin)\
**Post date:** [July 7, 2023, 12:02am UTC](https://discourse.julialang.org/t/problem-with-referencing-modules/100916/23 "2023-07-07T00:02:46Z")

</div>

Thanks for the information.

My goal was to get it working. Then I could find what liberty I have in working code.

You are correct …Module worked as well. I just seemed to have missed it in my reading. @Benny and maybe others mentioned it.

If not submodules then everything is an independent package?

Some of my submodules have no meaning outside of the package and it is simply helps keep a large code base clean. At least this one. But as I refactor the code to be more Julia idiomatic I will see what happens.

Again thanks.

Jimmie

---

<div class="post-metadata">

**Author:** ![jmair](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jmair/32/35117_2.png) [@jmair](https://discourse.julialang.org/u/jmair)\
**Post date:** [July 7, 2023, 6:57am UTC](https://discourse.julialang.org/t/problem-with-referencing-modules/100916/24 "2023-07-07T06:57:29Z")

</div>

PkgTemplates gives an older manifest file, but you can get rid of the warning easily:

```julia
julia> using Pkg
julia> Pkg.upgrade_manifest()

```

It also looks like you are in your Julia folder, but you should be in the root folder of your package. When you activate, you can just do `activate .`

Also, does your package contain a file `src/RhythemTrader.jl` ? This is the root of the package and should be created by PkgTemplates. This is the highest level module (called RhythemTrader), in which you should have all the includes for the other files.

[Previous page](https://discourse.julialang.org/t/problem-with-referencing-modules/100916.md?page=1)
