# Can't figure out how to dev-install unregistered package

**URL:** <https://discourse.julialang.org/t/cant-figure-out-how-to-dev-install-unregistered-package/70298>\
**Category:** General Usage\
**Tags:** pkg, installation\
**Created:** [October 24, 2021, 6:03pm UTC](https://discourse.julialang.org/t/cant-figure-out-how-to-dev-install-unregistered-package/70298 "2021-10-24T18:03:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![goerz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goerz/32/3269_2.png) [@goerz](https://discourse.julialang.org/u/goerz)\
**Post date:** [October 24, 2021, 6:03pm UTC](https://discourse.julialang.org/t/cant-figure-out-how-to-dev-install-unregistered-package/70298/1 "2021-10-24T18:03:53Z")

</div>

I’ve created folder `test` with the following `Project.toml`:

```julia
[deps]
QuantumControlBase = "f10a33bc-5a64-497c-be7b-6f86b4f0c2aa"
GRAPELinesearchAnalysis = "290eba36-e2d8-4488-81b6-f66cc44f2186"

[compat]
julia = "1.6"

```

There is no `Manifest.toml` in the `test` folder.

I have a checkout of both [QuantumControlBase](https://github.com/JuliaQuantumControl/QuantumControlBase.jl) and [GRAPELinesearchAnalysis](https://github.com/JuliaQuantumControl/GRAPELinesearchAnalysis.jl) in sibling folders of `test`. `QuantumControlBase` is in the standard registry while `GRAPELinesearchAnalysis` is unregistered. `GRAPELinesearchAnalysis` depends on `QuantumControlBase` (and other registered packages in [JuliaQuantumControl](https://github.com/JuliaQuantumContro)), but not vice versa. I want to start a REPL using both packages in dev-mode based on the local checkout I have. Here is what I get when I try to dev-install the packages:

```julia
goerz@ophelia master:~/JuliaQuantumControl> julia --project=test
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.6.1 (2021-04-23)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

julia> import Pkg

julia> Pkg.develop(path="./QuantumControlBase.jl/")
Path `./QuantumControlBase.jl/` exists and looks like the correct package. Using existing path.
   Resolving package versions...
ERROR: expected package `GRAPELinesearchAnalysis [290eba36]` to be registered

```

I’ve run into this same problem before when trying to develop the various packages in the [JuliaQuantumControl](https://github.com/JuliaQuantumContro) org. All of these should be tested against each other’s `master` or uncommitted versions, both locally and on CI (see the setup in the various projects’ [Makefile](https://github.com/JuliaQuantumControl/GRAPE.jl/blob/master/Makefile) and [`CI.yml`](https://github.com/JuliaQuantumControl/GRAPE.jl/blob/9d56ff2cd9473a2a4a11ef960eca56691d24e8d0/.github/workflows/CI.yml#L40-L54)). I haven’t been able to make this work at all while any of the packages were unregistered.

So far, I’ve worked around that by registering packages a bit “pre-maturely” as `0.0.1` versions, but for `GRAPELinesearchAnalysis` I don’t think I even want that to be registered: it’s just a debugging tool, plus the 3-day wait/review period for a new package will be a hassle for something that I want to quickly push out to a collaborator.

I’m just about ready to explore setting up my own registry, which would probably get around this problem, but is there really no way to instantiate an environment with dev-versions of unregistered packages?

---

<div class="post-metadata">

**Author:** ![goerz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goerz/32/3269_2.png) [@goerz](https://discourse.julialang.org/u/goerz)\
**Post date:** [October 24, 2021, 6:45pm UTC](https://discourse.julialang.org/t/cant-figure-out-how-to-dev-install-unregistered-package/70298/2 "2021-10-24T18:45:52Z")

</div>

To boil this down to a more minimal description: Best I can tell, if a `Project.toml` contains any unregistered package, then _any_ `Pkg` operation (`add`, `develop`, etc) in the environment will error out.

I can get around that by installing the unregistered package first, but that’s not always possible, and it stops working if there is more than one unregistered package.

---

<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:** [October 24, 2021, 7:01pm UTC](https://discourse.julialang.org/t/cant-figure-out-how-to-dev-install-unregistered-package/70298/3 "2021-10-24T19:01:27Z")

</div>

You need to install unregistered package in “dependency order”, e.g. the one with no unregistered deps first, then the one that depends on that one etc. Should always work.

---

<div class="post-metadata">

**Author:** ![goerz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goerz/32/3269_2.png) [@goerz](https://discourse.julialang.org/u/goerz)\
**Post date:** [October 25, 2021, 2:50am UTC](https://discourse.julialang.org/t/cant-figure-out-how-to-dev-install-unregistered-package/70298/4 "2021-10-25T02:50:00Z")

</div>

Thanks! That works indeed!

In this particular case, manually keeping track of the dependency structure across the entire organization (and test/docs `Project.toml` files) would be quite burdensome. So I ended up with a [local registry](https://github.com/JuliaQuantumControl/QuantumControlRegistry) instead, which also solves the problem quite nicely. I was actually surprised how easy the process of setting up a registry was, thanks to [`GunnarFarneback/LocalRegistry.jl`](https://github.com/GunnarFarneback/LocalRegistry.jl#readme).

Still, it would be nice if `Project.toml` had a better way of dealing with unregistered packages. Maybe a new section in `Project.toml` specifically for unregistered packages that serves as an “ad-hoc” registry, linking package names/UUIDs to git repos, so that `Pkg` wouldn’t have to complain.

---

<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:** [October 25, 2021, 12:06pm UTC](https://discourse.julialang.org/t/cant-figure-out-how-to-dev-install-unregistered-package/70298/5 "2021-10-25T12:06:50Z")

</div>

Yea, see #492 in Pkg.jl.
