# Pkg(3): develop package which depends on local/unregistered package

**URL:** <https://discourse.julialang.org/t/pkg-3-develop-package-which-depends-on-local-unregistered-package/12164>\
**Category:** Internals & Design\
**Tags:** question\
**Created:** [July 4, 2018, 2:42pm UTC](https://discourse.julialang.org/t/pkg-3-develop-package-which-depends-on-local-unregistered-package/12164 "2018-07-04T14:42:54Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [July 4, 2018, 2:42pm UTC](https://discourse.julialang.org/t/pkg-3-develop-package-which-depends-on-local-unregistered-package/12164/1 "2018-07-04T14:42:54Z")

</div>

I have two unregistered packages, one depends on the other. Both have `REQUIRE`, neither have a `Project.toml`. I thought the workflow was to add them with `develop`, but

```julia
(v0.7) pkg> develop ~/src/julia-local-packages/TransformVariables
┌ Warning: packages will need to have a [Julia]Project.toml file in the future
└ @ Pkg.Types Types.jl:578
[ Info: Assigning UUID 1f057d3e-7f98-11e8-255d-316739be82c2 to TransformVariables
 Resolving package versions...
  Updating `~/.julia/environments/v0.7/Project.toml`
  [1f057d3e] + TransformVariables v0.0.0 [`~/src/julia-local-packages/TransformVariables`]
  Updating `~/.julia/environments/v0.7/Manifest.toml`
  [1f057d3e] + TransformVariables v0.0.0 [`~/src/julia-local-packages/TransformVariables`]

(v0.7) pkg> develop ~/src/julia-local-packages/IndirectLikelihood
┌ Warning: packages will need to have a [Julia]Project.toml file in the future
└ @ Pkg.Types Types.jl:578
[ Info: Assigning UUID 2b9eaf52-7f98-11e8-2ec6-83273b37596d to IndirectLikelihood
 Resolving package versions...
ERROR: The following package names could not be resolved:
 * TransformVariables (1f057d3e-7f98-11e8-255d-316739be82c2 in manifest but not in project)
Please specify by known `name=uuid`.

(v0.7) pkg> VERSION
ERROR: invalid command: "VERSION"

julia> VERSION
v"0.7.0-beta.133"

```

---

<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 4, 2018, 3:36pm UTC](https://discourse.julialang.org/t/pkg-3-develop-package-which-depends-on-local-unregistered-package/12164/2 "2018-07-04T15:36:02Z")

</div>

That is the workflow but I accidentally left out the commit that makes this possible in a previous PR that updated Pkg… ([https://github.com/JuliaLang/julia/pull/27824/commits/259840d7718bdad4ca36ef4f0b30236a37842c04](https://github.com/JuliaLang/julia/pull/27824/commits/259840d7718bdad4ca36ef4f0b30236a37842c04)).

You can use the master version of Pkg to get around this or wait until the PR linked above is merged and new nightlies are out.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [July 5, 2018, 8:17am UTC](https://discourse.julialang.org/t/pkg-3-develop-package-which-depends-on-local-unregistered-package/12164/3 "2018-07-05T08:17:00Z")

</div>

> [@kristoffer.carlsson](#):
>
> use the master version of Pkg to get around this

Sorry for my ignorance, but how can I do that?

I have recently learned about using `julia --project` in the root of `Pkg`, but that appears to use an empty environment, ie `pkg> status` has no packages. So whatever I add there will not appear in my “usual” environment, is this correct?

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [July 5, 2018, 10:04am UTC](https://discourse.julialang.org/t/pkg-3-develop-package-which-depends-on-local-unregistered-package/12164/4 "2018-07-05T10:04:40Z")

</div>

OK, I also tried making a Project.toml for both, then inside `IndirectLikelihood`, add the dependency with `pkg> dev path/to/TransformVariables`, but

```julia
(IndirectLikelihood) pkg> status
Project IndirectLikelihood v0.1.0
    Status `Project.toml`
      [dce04be8] + ArgCheck v0.7.0
      [ffbed154] + DocStringExtensions v0.4.5
      [f6369f11] + ForwardDiff v0.7.5
      [1914dd2f] + MacroTools v0.4.2
      [d96e819e] + Parameters v0.9.0
      [eb4f743c] + TransformVariables v0.1.0 #518d56f (/home/tamas/src/julia-local-packages/TransformVariables)
[... manifest truncated ...]
julia> using IndirectLikelihood
[ Info: Precompiling module IndirectLikelihood
ERROR: LoadError: ArgumentError: Package IndirectLikelihood does not have TransformationsVariables in its dependencies:
 - If you have IndirectLikelihood checked out for development and have
   added TransformationsVariables as a dependency but haven't updated your primary
   environment's manifest file, try `Pkg.resolve()`.
 - Otherwise you may need to report an issue with IndirectLikelihood.

```

Using latest `master`.

---

<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 5, 2018, 10:04am UTC](https://discourse.julialang.org/t/pkg-3-develop-package-which-depends-on-local-unregistered-package/12164/5 "2018-07-05T10:04:41Z")

</div>

- Clone Pkg.
- Remove the `uuid = ` field in Project.toml.
- Then `dev /path/to/Pkg`.

Now, `import Pkg` should use the files in the repo instead of the one build into the sysimg.

---

<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 5, 2018, 10:05am UTC](https://discourse.julialang.org/t/pkg-3-develop-package-which-depends-on-local-unregistered-package/12164/6 "2018-07-05T10:05:35Z")

</div>

You would need `TransformationsVariables` in the REQUIRE file. Do you have that?

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [July 5, 2018, 10:07am UTC](https://discourse.julialang.org/t/pkg-3-develop-package-which-depends-on-local-unregistered-package/12164/7 "2018-07-05T10:07:35Z")

</div>

Yes, I have it in `REQUIRE`. But I also have it in `Project.toml`, wouldn’t that supersede `REQUIRE`? Both packages have a project file.

---

<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 5, 2018, 10:10am UTC](https://discourse.julialang.org/t/pkg-3-develop-package-which-depends-on-local-unregistered-package/12164/8 "2018-07-05T10:10:24Z")

</div>

Yes, if it is in the Project file then that would take precedence.

I am wondering if you are hitting [https://github.com/JuliaLang/julia/issues/27901](https://github.com/JuliaLang/julia/issues/27901) (which is now fixed [https://github.com/JuliaLang/julia/pull/27906](https://github.com/JuliaLang/julia/pull/27906)).

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [July 5, 2018, 10:36am UTC](https://discourse.julialang.org/t/pkg-3-develop-package-which-depends-on-local-unregistered-package/12164/9 "2018-07-05T10:36:06Z")

</div>

I am not sure. Removing ` __precompile__ ()` from `IndirectLikelihood.jl` did not fix the issue, but then `rm`ing and `dev`ing the dependency again did.

BTW, I am not sure I managed to load `master` of `Pkg.jl` from the cloned repo; when following your instructions, commenting out the `uuid` makes it complain about the missing `uuid`.

---

<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 5, 2018, 10:39am UTC](https://discourse.julialang.org/t/pkg-3-develop-package-which-depends-on-local-unregistered-package/12164/10 "2018-07-05T10:39:27Z")

</div>

Ah, you might have to give it a random uuid.

Here’s one.

```julia
julia> UUIDs.uuid1()
UUID("9b1dd374-803f-11e8-3c86-b3198277cbb9")

```

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [July 5, 2018, 11:46am UTC](https://discourse.julialang.org/t/pkg-3-develop-package-which-depends-on-local-unregistered-package/12164/11 "2018-07-05T11:46:37Z")

</div>

And now I re-enabled ` __precompile__ ()`, reverted to the `Pkg` included in Julia `master`, and everything seems to work fine. Thanks!

Just to recap, if one is willing to make the transition to project files, then the recommended workflow for two _unregistered_ projects `A` and `B`, with `B` depending on `A` is

```julia
shell> cd /wherever/A/is
(v0.7) pkg> init # and add an UUID, dependencies, etc
(v0.7) pkg> dev /wherever/A/is
shell> cd /path/of/B
(v0.7) pkg> init # and add, etc
(v0.7) pkg> activate .
(A) pkg> dev /wherever/A/is
(A) pkg> activate # no ., global env
(v0.7) pkg> dev /path/of/B

```

ie `dev A` in both `B` and the global env? Or is something superfluous here?

---

<div class="post-metadata">

**Author:** ![chakravala](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chakravala/32/6832_2.png) [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Post date:** [July 8, 2018, 12:24am UTC](https://discourse.julialang.org/t/pkg-3-develop-package-which-depends-on-local-unregistered-package/12164/12 "2018-07-08T00:24:27Z")

</div>

Trying to follow these instructions as well, I have an unregistered package named `JuliaTeX` that depends on another unregistered package named `VerTeX` and after following these instructions I get this

```nohighlight
julia> Pkg.resolve()
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package VerTeX [10c596c0]:
 VerTeX [10c596c0] log:
 ├─VerTeX [10c596c0] has no known versions!
 └─restricted to versions * by JuliaTeX [fc8764c4] — no versions left
   └─JuliaTeX [fc8764c4] log:
     ├─possible versions are: 0.0.0 or uninstalled
     └─JuliaTeX [fc8764c4] is fixed to version 0.0.0

```

so is it only possible to load these if they have a version tagged? this new workflow is confusing me

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [July 8, 2018, 5:55am UTC](https://discourse.julialang.org/t/pkg-3-develop-package-which-depends-on-local-unregistered-package/12164/13 "2018-07-08T05:55:33Z")

</div>

Did you have a `Project.toml` for at least `VerTex`? That’s the only way I got this working.

---

<div class="post-metadata">

**Author:** ![chakravala](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chakravala/32/6832_2.png) [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Post date:** [July 8, 2018, 5:59am UTC](https://discourse.julialang.org/t/pkg-3-develop-package-which-depends-on-local-unregistered-package/12164/14 "2018-07-08T05:59:55Z")

</div>

Yes, I have it, but I’m not sure what all needs to be in it, I put the name and uuid.

---

<div class="post-metadata">

**Author:** ![chakravala](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chakravala/32/6832_2.png) [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Post date:** [July 8, 2018, 5:41pm UTC](https://discourse.julialang.org/t/pkg-3-develop-package-which-depends-on-local-unregistered-package/12164/15 "2018-07-08T17:41:12Z")

</div>

Any way that I try it, I always end up with the error message about there being no known versions of `VerTeX`

Is it possibly a bug, since I have version 0.0.0 there, but it can’t be picked?

---

<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 8, 2018, 7:28pm UTC](https://discourse.julialang.org/t/pkg-3-develop-package-which-depends-on-local-unregistered-package/12164/16 "2018-07-08T19:28:25Z")

</div>

This is likely bugged on beta so if that is what you are using, try nightly.

---

<div class="post-metadata">

**Author:** ![chakravala](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chakravala/32/6832_2.png) [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Post date:** [July 8, 2018, 7:41pm UTC](https://discourse.julialang.org/t/pkg-3-develop-package-which-depends-on-local-unregistered-package/12164/17 "2018-07-08T19:41:50Z")

</div>

I’m using a build from yesterday night, but I just figured out my problem. What I had to do was to manually edit the `~/.julia/environments/Manifest.toml` file and change the `repo` to a `path` with the `dev/JuliaTeX` directory, for some reason this was not correctly set by the REPL commands.

---

<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 9, 2018, 7:13am UTC](https://discourse.julialang.org/t/pkg-3-develop-package-which-depends-on-local-unregistered-package/12164/18 "2018-07-09T07:13:13Z")

</div>

> [@chakravala](#):
>
> manually edit the `~/.julia/environments/Manifest.toml` file

The manifest should never need to be edited manually. If you could reproduce what to do that makes the Manifest not update correctly, that would be helpful.

---

<div class="post-metadata">

**Author:** ![chakravala](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chakravala/32/6832_2.png) [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Post date:** [July 9, 2018, 1:45pm UTC](https://discourse.julialang.org/t/pkg-3-develop-package-which-depends-on-local-unregistered-package/12164/19 "2018-07-09T13:45:33Z")

</div>

> [@kristoffer.carlsson](#):
>
> The manifest should never need to be edited manually. If you could reproduce what to do that makes the Manifest not update correctly, that would be helpful.

I’m not sure of the exact sequence of events, but I believe it had to do with a combination of switching over from an older build of Julia and the “chicken and egg” problem of cloning an unregistered repository form github without any Project.toml file. Since the repository was previously downloaded in earlier version of Julia, it was in the Manifest as a repo reference. When I tried to `dev` into it, it would always fail because the version requirements are unsatisfiable, which was because the environment Manifest file was referencing the repo version and not the local stateful dev version where I had the new Project.toml.

So, I think it’s a combination of having leftovers from an earlier Julia version, as well as the chicken and egg problem of cloning an unregistered package that does not contain a Project.toml. That’s my assessment.

I think it could help future users if there was some more information about how to debug potential issues like this with the package manager, but I’m not quite sure yet what the best information for that would be yet.

---

<div class="post-metadata">

**Author:** ![jlapeyre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlapeyre/32/4514_2.png) [@jlapeyre](https://discourse.julialang.org/u/jlapeyre)\
**Post date:** [July 12, 2018, 3:45pm UTC](https://discourse.julialang.org/t/pkg-3-develop-package-which-depends-on-local-unregistered-package/12164/20 "2018-07-12T15:45:55Z")

</div>

How can I make a PR to `Pkg` ? Maybe like this:

> [@kristoffer.carlsson](#):
>
> - Clone Pkg.
> - Remove the `uuid =` field in Project.toml.
> - Then `dev /path/to/Pkg` .

Then fork `Pkg` on github, then add a remote to the repo created above that points to the fork on github.

[Next page](https://discourse.julialang.org/t/pkg-3-develop-package-which-depends-on-local-unregistered-package/12164.md?page=2)
