# Unregistered sub-packages in a registered main-package

**URL:** <https://discourse.julialang.org/t/unregistered-sub-packages-in-a-registered-main-package/100442>\
**Category:** General Usage\
**Tags:** question, package\
**Created:** [June 16, 2023, 10:09am UTC](https://discourse.julialang.org/t/unregistered-sub-packages-in-a-registered-main-package/100442 "2023-06-16T10:09:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![imre](https://avatars.discourse-cdn.com/v4/letter/i/bc8723/32.png) [@imre](https://discourse.julialang.org/u/imre)\
**Post date:** [June 16, 2023, 10:09am UTC](https://discourse.julialang.org/t/unregistered-sub-packages-in-a-registered-main-package/100442/1 "2023-06-16T10:09:29Z")

</div>

Hi,  
I would like to create a package (which will be registered at some point), which contains multiple unregistered sub-packages. I’m aware that I can add unregistered sub-packages to my main package via `dev` in the package manager and that works fine. My two questions are:

- Is it possible (and also good practice) to register such a package containing unregistered sub-packages?
- If the answer to the first question is yes, how would a concrete implementation look like? Or to be more precise, how would I encode the dependency on those local sub-packages in the **Project.toml** file of the main package?

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [June 16, 2023, 10:15am UTC](https://discourse.julialang.org/t/unregistered-sub-packages-in-a-registered-main-package/100442/2 "2023-06-16T10:15:09Z")

</div>

No, registered packages in General must not depend on unregistered packages, see [GitHub - JuliaRegistries/General: The official registry of general Julia packages](https://github.com/JuliaRegistries/General#can-my-package-in-this-registry-depend-on-unregistered-packages).

---

<div class="post-metadata">

**Author:** ![imre](https://avatars.discourse-cdn.com/v4/letter/i/bc8723/32.png) [@imre](https://discourse.julialang.org/u/imre)\
**Post date:** [June 16, 2023, 10:26am UTC](https://discourse.julialang.org/t/unregistered-sub-packages-in-a-registered-main-package/100442/3 "2023-06-16T10:26:55Z")

</div>

Thanks for the link!

---

<div class="post-metadata">

**Author:** ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Post date:** [June 16, 2023, 2:45pm UTC](https://discourse.julialang.org/t/unregistered-sub-packages-in-a-registered-main-package/100442/4 "2023-06-16T14:45:32Z")

</div>

If you’re going to register the package, but not the individual components; the components should be submodules, not subpackages. I have a package like that here, if you need an example:

> **[Neven Sajko / FindMinimaxPolynomial.jl · GitLab](https://gitlab.com/nsajko/FindMinimaxPolynomial.jl)**
>
> GitLab.com
