# Automatic import of dependent packages

**URL:** https://discourse.julialang.org/t/automatic-import-of-dependent-packages/9517
**Category:** General Usage
**Created:** [March 5, 2018, 8:18pm UTC](https://discourse.julialang.org/t/automatic-import-of-dependent-packages/9517 "2018-03-05T20:18:54Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![wsshin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wsshin/32/360_2.png) [@wsshin](https://discourse.julialang.org/u/wsshin)
#### Post date: [March 5, 2018, 8:18pm UTC](https://discourse.julialang.org/t/automatic-import-of-dependent-packages/9517/1 "2018-03-05T20:18:54Z")

</div>

Suppose I develop a package named `MyPkg`. Also suppose the users of `MyPkg` must always use other packages `PkgA` and `PkgB` (e.g., a core function exported from `MyPkg` takes types defined in `PkgA` and `PkgB`). In that case, it will be convenient if `PkgA` and `PkgB` are automatically imported when the users import `MyPkg`.

Does Julia have such a capability? In other words, I wonder if there is a way to execute `using PkgA, PkgB` automatically in `Main` when the users execute `using MyPkg` in `Main`. Or, do I have to ask users to execute `using MyPkg, PkgA, PkgB` whenever they want to use `MyPkg`?

---

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [March 5, 2018, 8:31pm UTC](https://discourse.julialang.org/t/automatic-import-of-dependent-packages/9517/2 "2018-03-05T20:31:20Z")

</div>

[https://github.com/simonster/Reexport.jl](https://github.com/simonster/Reexport.jl)
