How to use multiple levels of module?

question

#1

suppose that we have a module hierarchy of Foo.Bar.XX, and Foo.YY
in the XX module, how can I use YY module?
I tried these two, do not work
using …/…YY
using …YY


#2

Can you please write some code with the modules so that we can try answer the question properly?


#3

https://stackoverflow.com/questions/40310787/julia-code-encapsulation-is-this-a-generally-good-idea/40314833#40314833


#4

This test code works, but the same way do not work in my project…

module C                                                                                                              
 end                                                                                                                   
                                                                                                                       
 module A                                                                                                              
 module B                                                                                                              
 using ....C                                                                                                           
 end                                                                                                                   
 end         

#5

Then the issue is somewhere else in your project? Try to comment out the code until you get something that works. The syntax is correct, you can do

using C

or

using ....C

in this case because the module C is at the top level (i.e. Main.C).


#6

Thanks, I’ll just use the Main.C approach for now. It works.