Sorry for the noob question. I have a utility module that I would like to share between two other modules. As far as I understand, simply using include("whatever/path/UtilityModule.jl") followed by using .UtilityModule inside each module will just duplicate the code of the utility module instead of “sharing” it. What is the proper way for doing this apart from creating a package (in this case, the module is not worth putting into a separate package)?
I would appreciate any help on this issue.
Thank you!
That’s interesting. I was not aware of ..import syntax I presume it works with using as well. I am still curious if there is a way to use a module from a “general” path.
if there is a way to use a module from a “general” path
By this, do you mean using your own module across disparate projects? If so, your best bet would probably be to build your module as a package, then import it into the specific project that you’re working on.
Ok, I think I got it. Modules · The Julia Language
I have to have a separate module that contains both of my modules. Julia namespace approach is quite confusing.