# Module dependency management

**URL:** <https://discourse.julialang.org/t/module-dependency-management/8614>\
**Category:** General Usage\
**Tags:** module\
**Created:** [January 26, 2018, 1:54pm UTC](https://discourse.julialang.org/t/module-dependency-management/8614 "2018-01-26T13:54:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kimran](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kimran/32/7782_2.png) [@kimran](https://discourse.julialang.org/u/kimran)\
**Post date:** [January 26, 2018, 1:54pm UTC](https://discourse.julialang.org/t/module-dependency-management/8614/1 "2018-01-26T13:54:43Z")

</div>

What is the current best practice for module dependency management?

Say I have a larger project, with many modules and a tree structure of module dependency

How do I go about having the `include` and tracking (ala `[Revise](https://github.com/timholy/Revise.jl).track`) done automatically (as much as possible) for me?  
Possibly even to `include` in the correct order and automatically, i.e. starting with the root of the module dependency tree?

Is creating (local) packages out of modules, creating the REQUIRE file and then using Revise the way to go?

I have written code for myself to manage this for me (It does what Revise does and `include`’s the files in the correct order, after the user defines)  
But I am hoping that this perhaps has a more “professional” solution, as I believe this should be a problem that many face yet I cannot seem to find much on it online

Thanks

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [January 26, 2018, 3:03pm UTC](https://discourse.julialang.org/t/module-dependency-management/8614/2 "2018-01-26T15:03:49Z")

</div>

My experience is that `Revise.jl` automagically handles whatever was loaded via `using`, `import`, and `include`. I never had to do anything special, other than enabling it (as described in the README).

---

<div class="post-metadata">

**Author:** ![kimran](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kimran/32/7782_2.png) [@kimran](https://discourse.julialang.org/u/kimran)\
**Post date:** [January 26, 2018, 4:31pm UTC](https://discourse.julialang.org/t/module-dependency-management/8614/3 "2018-01-26T16:31:27Z")

</div>

Revise does not take care of including in the correct order though

Example:  
A.jl:

```julia
module A
import B
end

```

B.jl:

```julia
module B
end

```

Test\_Wrong.jl:

```julia
using Revise
Revise.track("A.jl") # gives an error because B is unknown
Revise.track("B.jl") # works but the line before failed

```

Test\_Correct.jl:

```julia
using Revise
Revise.track("B.jl") # works
Revise.track("A.jl") # works

```

So how to do the `include`s or `track` in the correct order - this can be automated and I wonder how people with large projects are dealing with it
