How do one avoid re-importing (dont want to use
using dep_package_1 more than once)
a dependency in case of creating a sub-package:
situation in detail as follows:
using dep_package_1 # dependency
# some code inlcuded using functions in dep_package 1
using dep_package _1 # do not wish to do this again here
# some more code, under my_subpackage 1
First, why you do not want to add
However, if you do not want to do this twice, you can reexport everything of
my_subpackage and then add
using my_subpackage to
It may sound silly now, but i was thinking about not writing redundant lines first.
So, if i keep the code as it is, it wouldn’t cause any performance issues ,right?
using Pkg_name second time is infact more efficient/effortless compared to the first-time in julia if i am not wrong !(?)
No, it’s not. The second time will be almost instantaneous.