Hi,

I have a large private package that depends on many other private packages 
and each smaller package may depends on other private packages. It is a bit 
tangled, but working.

For example:

# A,B,C,D are all private packages
module A

using B, C, D

...

end

with

module D

using B, C

...

end

However, I was having trouble ensuring that my team was using the same 
versions of all these private packages.

So... I got a bright idea to use Git submodules for module A with B,C,D 
being Git submodules.

Now, I changed module A to:

module A

modules = ["B","C","D"]
for mod in modules
    include(Pkg.dir("A","src",mod,"src","$mod.jl"))
end

...

end

and I removed modules B,C,D from my package directory.

HOWEVER, module D is still `using B,C`, but I obviously get errors for that 
because B & C are no longer in my package directory.

The, in desperation, I started trying things like:

modules = ["B","C"]
for mod in modules
    sym = Symbol(mod)
    isdefined(sym) || eval(Expr(:using, sym))
end

and various permutations. 

REQUIRE would seem like a good thing to try, but according to this 
<https://groups.google.com/forum/#!searchin/julia-users/REQUIRE|sort:date/julia-users/YTz59MAXHvY/cihOYBWJBgAJ>,
 
REQUIRE doesn't work for packages not in METADATA.

Any ideas? Can I use Git submodules for this and somehow get `using` to 
work or punt and stop using `using` in the submodules and just include my 
files in each submodule?

Thank you for any help.




Reply via email to