# Inter-registry dependencies

**URL:** <https://discourse.julialang.org/t/inter-registry-dependencies/56932>\
**Category:** Package Management\
**Tags:** question\
**Created:** [March 11, 2021, 6:04am UTC](https://discourse.julialang.org/t/inter-registry-dependencies/56932 "2021-03-11T06:04:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![wildart](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wildart/32/57_2.png) [@wildart](https://discourse.julialang.org/u/wildart)\
**Post date:** [March 11, 2021, 6:04am UTC](https://discourse.julialang.org/t/inter-registry-dependencies/56932/1 "2021-03-11T06:04:05Z")

</div>

Current registry design does not allow to register packages that have dependencies registered in other registries. This limitation is circumvented for any package registered in `General` registry because this registry is the _default_ one. I believe it was done intentionally because the multi-registry design was created primarily to support “walled garden” rather then naming encapsulation.

So, is it possible to remove such limitation?

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [March 11, 2021, 6:59am UTC](https://discourse.julialang.org/t/inter-registry-dependencies/56932/2 "2021-03-11T06:59:23Z")

</div>

> [@wildart](#):
>
> Current registry design does not allow to register packages that have dependencies registered in other registries.

The only limitation right now (AFAIK) is that you need to have the registries available on your system before you add the package. Other than that, there isn’t any technical issue with having dependencies that are registered in other registries.

---

<div class="post-metadata">

**Author:** ![oxinabox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oxinabox/32/206603_2.png) [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Post date:** [March 11, 2021, 9:10am UTC](https://discourse.julialang.org/t/inter-registry-dependencies/56932/3 "2021-03-11T09:10:55Z")

</div>

Invenia’s private registry has hundreds of dependencies on things registered in General.

---

<div class="post-metadata">

**Author:** ![wildart](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wildart/32/57_2.png) [@wildart](https://discourse.julialang.org/u/wildart)\
**Post date:** [March 11, 2021, 9:47pm UTC](https://discourse.julialang.org/t/inter-registry-dependencies/56932/4 "2021-03-11T21:47:45Z")

</div>

> [@kristoffer.carlsson](#):
>
> The only limitation right now (AFAIK) is that you need to have the registries available on your system before you add the package.

Assuming that I what to install a package from the private registry, and I know a registry location which I add to the package manager prior to installation. Now, I install a package and it happens to have a dependency that registered in another registry, that I am not aware of. In order to successfully install a package, I need to collect information about all possible registries from where dependencies came, and make this information available to the package manager.

When I refer to a design limitation, it’s the limitation in the registry format that does not allow connectivity between various registries, and subsequent dependency on manual information discovery process.

> [@oxinabox](#):
>
> Invenia’s private registry has hundreds of dependencies on things registered in General.

As I mentioned, General registry has a privileged position as it’s information hard-coded in every Julia installation. Remove General registry from the package manager, and you won’t be able to install any package from Invenia’s registry that has dependency on General’s packages.

---

<div class="post-metadata">

**Author:** ![JeffFessler](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jefffessler/32/6650_2.png) [@JeffFessler](https://discourse.julialang.org/u/JeffFessler)\
**Post date:** [July 28, 2021, 2:23am UTC](https://discourse.julialang.org/t/inter-registry-dependencies/56932/5 "2021-07-28T02:23:33Z")

</div>

> [@kristoffer.carlsson](#):
>
> The only limitation right now (AFAIK) is that you need to have the registries available on your system before you add the package.

I am developing a package that I would like to add to the main Julia registry, but my package depends on another package that is in a personal (but public) registry:

> <https://github.com/emmt/LinearInterpolators.jl/issues/4>
>
> I am happy to find this package because I need an interpolator that has an adjoi…nt.
> 
> But to build other packages on top of it confidently, I feel it would need to be in the general Julia registry
> so that I can enter \`\[compat\]\` for specific versions.
> Do you have a plan for registering it, e.g., after hitting certain milestones in code coverage or such?
> 
> Also, the docs link is broken right now. Do you want a PR to help with setting up Documenter/Literate?

Is there a way to set up my package’s Project.toml to refer to the other package in this other registry so that CI etc. will work?  
If not, are there any other options, other than duplicating the relevant code from that other package in my own (with attribution of course) which seems like a last resort…

Apologies if this is off topic; it seemed like the most related post in this category.

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [July 28, 2021, 6:50am UTC](https://discourse.julialang.org/t/inter-registry-dependencies/56932/6 "2021-07-28T06:50:45Z")

</div>

> [@JeffFessler](#):
>
> I am developing a package that I would like to add to the main Julia registry, but my package depends on another package that is in a personal (but public) registry:

That does not work. Packages registered in the General registry can only depend on other packages registered in the General registry.
