# Registering in General packages not intended for the general public

**URL:** https://discourse.julialang.org/t/registering-in-general-packages-not-intended-for-the-general-public/40236
**Category:** General Usage
**Tags:** question, package, registry
**Created:** [May 27, 2020, 6:50am UTC](https://discourse.julialang.org/t/registering-in-general-packages-not-intended-for-the-general-public/40236 "2020-05-27T06:50:19Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)
#### Post date: [May 27, 2020, 6:50am UTC](https://discourse.julialang.org/t/registering-in-general-packages-not-intended-for-the-general-public/40236/1 "2020-05-27T06:50:19Z")

</div>

(This has been spurred by a comment by Stefan on slack#pkg-registration) I’m a researcher at a lab. I write tools in Julia for the lab. I know no one outside the lab would need to use some of these tools. Should I be registering my tools in the General registry or not?

Reasons to why not:

1. Package names are a shared community resource, so don’t take up names for packages that only a handful would use when those names could be used by more popular packages.
2. By registering a package you are essentially committing to keeping it registered forever. A package for a tool used by a lab doesn’t seem to fit that bill. A typical tool would be used for a couple of years at most.
3. Packages at the registry are meant to be useful for everyone. These tools are usually very specific, useful for a handful of people at specific times for a short period of time.

Reasons to why yes:

1. Everything is automated and feature rich, why not use it? It’s there to be used, and the strain/cost is so minimal that there is no reason not to use it.

I’d like to hear your thoughts about this issue. If you think the general registry shouldn’t be used for such tools, what then are the best alternatives? It would be great if you could link to tutorials/docs when you suggest an alternative.

I’m slowly gravitating towards the answer “No”… But I’m uncertain how to replace the functionality of the registry (what with the registration bot, compat helper, the ease of just `]add`ing a package, etc.).

Thanks!

---

<div class="post-metadata">

### Author: ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)
#### Post date: [May 27, 2020, 7:00am UTC](https://discourse.julialang.org/t/registering-in-general-packages-not-intended-for-the-general-public/40236/2 "2020-05-27T07:00:41Z")

</div>

What part of the automation do you not get if you do not register the package?

- Compat helper works without registration
- You can still `pkg> add` unregistered packages, you just need the full URL

---

<div class="post-metadata">

### Author: ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)
#### Post date: [May 27, 2020, 7:01am UTC](https://discourse.julialang.org/t/registering-in-general-packages-not-intended-for-the-general-public/40236/3 "2020-05-27T07:01:55Z")

</div>

True, but what about unregistered packages that depend on other unregistered packages that depend on other unregistered packages etc?

---

<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: [May 27, 2020, 7:07am UTC](https://discourse.julialang.org/t/registering-in-general-packages-not-intended-for-the-general-public/40236/4 "2020-05-27T07:07:25Z")

</div>

This is exactly what the [LocalRegistry](https://github.com/GunnarFarneback/LocalRegistry.jl) package is designed for.

---

<div class="post-metadata">

### Author: ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)
#### Post date: [May 27, 2020, 7:07am UTC](https://discourse.julialang.org/t/registering-in-general-packages-not-intended-for-the-general-public/40236/5 "2020-05-27T07:07:43Z")

</div>

For those I usually add install instructions in the readme, essentially a series of `pkg> add`.  
You could also set up a lab specific registry from which users could install the packages after having added the registry

---

<div class="post-metadata">

### Author: ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)
#### Post date: [May 27, 2020, 7:13am UTC](https://discourse.julialang.org/t/registering-in-general-packages-not-intended-for-the-general-public/40236/6 "2020-05-27T07:13:10Z")

</div>

> [@GunnarFarneback](#):
>
> This is exactly what the [LocalRegistry](https://github.com/GunnarFarneback/LocalRegistry.jl) package is designed for.

This is pretty amazing! Would all the other packages in the General registry also be available there, or how would that work?

> [@baggepinnen](#):
>
> For those I usually add install instructions in the readme, essentially a series of `pkg> add` .

I’m dealing with people that have very limited technical skills, but yes, that would work.

> [@baggepinnen](#):
>
> You could also set up a lab specific registry from which users could install the packages after having added the registry

So I’m assuming you’re referring to @GunnarFarneback’s suggestion?

---

<div class="post-metadata">

### Author: ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)
#### Post date: [May 27, 2020, 7:15am UTC](https://discourse.julialang.org/t/registering-in-general-packages-not-intended-for-the-general-public/40236/7 "2020-05-27T07:15:11Z")

</div>

> [@yakir12](#):
>
> So I’m assuming you’re referring to @GunnarFarneback’s suggestion?

I think we wrote it at the same time, but he was slightly faster at posting 🙂. Yes, we probably refer to the same thing, and Gunnar appears to have a nice way of setting up such a registry I was not aware of.

---

<div class="post-metadata">

### Author: ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)
#### Post date: [May 27, 2020, 7:18am UTC](https://discourse.julialang.org/t/registering-in-general-packages-not-intended-for-the-general-public/40236/8 "2020-05-27T07:18:03Z")

</div>

This is great. LocalRegistry seems ideal. I’ll need to see how to have access to the General registry as well (kind of like stacked environments in Pkg), and I’ll give it a shot. Conditional on it working, my next step would be to kill the few public packages I have in the General registry…

---

<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: [May 27, 2020, 7:24am UTC](https://discourse.julialang.org/t/registering-in-general-packages-not-intended-for-the-general-public/40236/9 "2020-05-27T07:24:27Z")

</div>

> [@yakir12](#):
>
> I’ll need to see how to have access to the General registry as well (kind of like stacked environments in Pkg), and I’ll give it a shot.

Just add the local registry and you are done. The General registry is not going anywhere and Pkg reads from all registries automatically.

---

<div class="post-metadata">

### Author: ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)
#### Post date: [May 27, 2020, 7:26am UTC](https://discourse.julialang.org/t/registering-in-general-packages-not-intended-for-the-general-public/40236/10 "2020-05-27T07:26:05Z")

</div>

This is awesome!!! Wish I knew about this earlier. OK, here I go killing (my public packages) again!

Thanks everyone!

---

<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: [May 27, 2020, 8:59am UTC](https://discourse.julialang.org/t/registering-in-general-packages-not-intended-for-the-general-public/40236/11 "2020-05-27T08:59:00Z")

</div>

> [@kristoffer.carlsson](#):
>
> Just add the local registry and you are done. The General registry is not going anywhere and Pkg reads from all registries automatically.

There’s one minor gotcha to be aware of. If you make a new Julia installation and do `pkg> registry add <lab_registry_url>` as your first Pkg operation, `General` will not be added automatically and you will need a manual `pkg> registry add General`.

---

<div class="post-metadata">

### Author: ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)
#### Post date: [May 27, 2020, 9:03am UTC](https://discourse.julialang.org/t/registering-in-general-packages-not-intended-for-the-general-public/40236/12 "2020-05-27T09:03:49Z")

</div>

And to avoid that, instead of telling people to:

```julia
import Pkg
Pkg.Registry.add(<lab_registry_url>)

```

I can tell them to:

```julia
import Pkg
Pkg.update()
Pkg.Registry.add(<lab_registry_url>)

```

?

---

<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: [May 27, 2020, 9:10am UTC](https://discourse.julialang.org/t/registering-in-general-packages-not-intended-for-the-general-public/40236/13 "2020-05-27T09:10:39Z")

</div>

There are many ways to induce General to be added. You can easily test what works or not for a new installation by pointing `JULIA_DEPOT_PATH` to an empty directory before starting Julia. I would probably go with

```julia
using Pkg
pkg"registry add General <lab_registry_url>"

```

---

<div class="post-metadata">

### Author: ![heliosdrm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heliosdrm/32/3851_2.png) [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)
#### Post date: [May 27, 2020, 9:23am UTC](https://discourse.julialang.org/t/registering-in-general-packages-not-intended-for-the-general-public/40236/14 "2020-05-27T09:23:58Z")

</div>

I confirm that LocalRegistry.jl is a perfect tool for that purpose. I’m using it in my corporate setting to manage the packages that are meant to be used only by my work team.

---

<div class="post-metadata">

### Author: ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)
#### Post date: [May 27, 2020, 9:24am UTC](https://discourse.julialang.org/t/registering-in-general-packages-not-intended-for-the-general-public/40236/15 "2020-05-27T09:24:47Z")

</div>

Nice, thanks for the encouragement!
