# Pluto and packages under development

**URL:** <https://discourse.julialang.org/t/pluto-and-packages-under-development/72768>\
**Category:** General Usage\
**Tags:** package, development, pluto\
**Created:** [December 8, 2021, 12:46pm UTC](https://discourse.julialang.org/t/pluto-and-packages-under-development/72768 "2021-12-08T12:46:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![threadedblue](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/threadedblue/32/19247_2.png) [@threadedblue](https://discourse.julialang.org/u/threadedblue)\
**Post date:** [December 8, 2021, 12:46pm UTC](https://discourse.julialang.org/t/pluto-and-packages-under-development/72768/1 "2021-12-08T12:46:42Z")

</div>

As I see it, a primary concern of Pluto is ensuring the shareability of notebooks. (There, I just invented a word.) And for this reason, Pluto requires packages to be registered. Am I not correct? However, sometimes and a package in question is under development and registration doesn’t make sense. I’ve read about setting up some kind of local registry as a work around.

Q: Is this advisable? Are there any gotchas?

I would very much like to use Pluto to show off my package as a work-in-progress over, let’s say, a Zoom meeting. Sharing the whole notebook then is not necessary and even undesirable.

Thanks

---

<div class="post-metadata">

**Author:** ![lungben](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lungben/32/12314_2.png) [@lungben](https://discourse.julialang.org/u/lungben)\
**Post date:** [December 8, 2021, 1:00pm UTC](https://discourse.julialang.org/t/pluto-and-packages-under-development/72768/2 "2021-12-08T13:00:53Z")

</div>

> [@threadedblue](#):
>
> Q: Is this advisable?

Yes, using [a LocalRegistry.jl](https://github.com/GunnarFarneback/LocalRegistry.jl) in Pluto works great. Make sure that all users add this registry before opening the notebook.

If you are continouosly updating a package,

```julia
using Revise, Pkg
Pkg.develop("MyPackage")

```

works better.

---

<div class="post-metadata">

**Author:** ![threadedblue](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/threadedblue/32/19247_2.png) [@threadedblue](https://discourse.julialang.org/u/threadedblue)\
**Post date:** [December 8, 2021, 1:42pm UTC](https://discourse.julialang.org/t/pluto-and-packages-under-development/72768/3 "2021-12-08T13:42:59Z")

</div>

Thanks for the response.  
I read the docs on LocalRegistry.jl.  
Apparently, I can point it to a local repository, and opposed to a remote, then take advantage of Revise, which I have also read up on. Because I am the sole user, I can them go to town. Do I have this all correct?

Thanks again

---

<div class="post-metadata">

**Author:** ![lungben](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lungben/32/12314_2.png) [@lungben](https://discourse.julialang.org/u/lungben)\
**Post date:** [December 8, 2021, 2:59pm UTC](https://discourse.julialang.org/t/pluto-and-packages-under-development/72768/4 "2021-12-08T14:59:21Z")

</div>

The use cases for both are orthogonal:  
With LocalRegistry, you are working on specific versions of your package (analogue to registered packages), which are stored in the notebook and guarantee reprocibility. But updates are rather slow because you need to register a new version and then update the package version in your notebook.  
With Revise, you automatically get all updates you are doing in the package in real-time, but you loose reproducibility.

The LocalRegistry method is imho better suited for using internal packages, whereas the Revise method is better for developing packages.

---

<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:** [December 8, 2021, 3:16pm UTC](https://discourse.julialang.org/t/pluto-and-packages-under-development/72768/5 "2021-12-08T15:16:16Z")

</div>

You can turn off Pluto’s built in package manager by placing `Pkg.activate()` anywhere in your notebook.

More details: [https://github.com/fonsp/Pluto.jl/wiki/🎁-Package-management#advanced-set-up-an-environment-with-pkgactivate](https://github.com/fonsp/Pluto.jl/wiki/%F0%9F%8E%81-Package-management#advanced-set-up-an-environment-with-pkgactivate)

---

<div class="post-metadata">

**Author:** ![threadedblue](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/threadedblue/32/19247_2.png) [@threadedblue](https://discourse.julialang.org/u/threadedblue)\
**Post date:** [December 8, 2021, 4:44pm UTC](https://discourse.julialang.org/t/pluto-and-packages-under-development/72768/6 "2021-12-08T16:44:54Z")

</div>

Turning it off Package management is exactly what I needed.

Thanks for that

---

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [December 8, 2021, 10:30pm UTC](https://discourse.julialang.org/t/pluto-and-packages-under-development/72768/7 "2021-12-08T22:30:16Z")

</div>

It’s possible to keep using Pluto Pkg manager for registered packages, and `]develop` WIP packages manually. Possible and simple, but not documented or officially supported.  
Just execute

```julia
function Pluto.use_plutopkg(topology::Pluto.NotebookTopology)
    !any(values(topology.nodes)) do node
        Symbol("Pkg.activate") ∈ node.references ||
        Symbol("Pkg.API.activate") ∈ node.references ||
        Symbol("quickactivate") ∈ node.references ||
        Symbol("@quickactivate") ∈ node.references
    end
end

```

before Pluto.run(), and freely use Pkg.add and Pkg.develop in notebooks.
