Module dependency management



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]( 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



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).


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


module A
import B


module B


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


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

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