# \`Pkg.resolve()\` fails when upgrading to v0.7

**URL:** <https://discourse.julialang.org/t/pkg-resolve-fails-when-upgrading-to-v0-7/12272>\
**Category:** General Usage\
**Tags:** pkg\
**Created:** [July 9, 2018, 2:47pm UTC](https://discourse.julialang.org/t/pkg-resolve-fails-when-upgrading-to-v0-7/12272 "2018-07-09T14:47:42Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Post date:** [July 9, 2018, 2:47pm UTC](https://discourse.julialang.org/t/pkg-resolve-fails-when-upgrading-to-v0-7/12272/1 "2018-07-09T14:47:42Z")

</div>

Not to bloat the Upgradathon thread any further, I am asking in a new thread. Irrelevant point: I can’t seem to add or find “upgradathon” or “v0.7” tags, it would be nice to have something like that at least temporarily.

I have been trying to upgrade `KissThreading.jl` which uses functions that were moved to `Random` and others to `StatsBase`. I cloned the package as an old habit since it is not registered, I suppose `develop` is the `Pkg3` analogue. The package was installed in the `.julia/dev` folder.

I then tried adding the following lines:

```julia
if VERSION > v"0.7-"
    using Random: MersenneTwister, randjump
end

```

I also used similar lines for some `StatsBase` functions, and then ran the tests again only to get:

```julia
ERROR: LoadError: LoadError: ArgumentError: Package KissThreading does not have Random in its dependencies:
 - If you have KissThreading checked out for development and have
   added Random 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 KissThreading.

```

Now I am on the master branch of `KissThreading` so I suppose that means I have it checked out for development, but I didn’t add Random as a dependency since it was not in the `REQUIRE` file, since there was no `REQUIRE` file to begin with. So great, I added `Random` and `StatsBase` to a REQUIRE file and tried again, got the same error. I then ran `Pkg.resolve()` as it recommends and got the following error:

```julia
ERROR: The following package names could not be resolved:
 * Random (9a3f8284-a2c9-5f02-9a11-845980a1fd5c in manifest but not in project)
Please specify by known `name=uuid`.

```

While I was trying random things, I removed the contents of the `REQUIRE` file again and tried `Pkg.resolve()` again getting a different error this time:

```julia
ERROR: Unsatisfiable requirements detected for package (unknown) [10745b16]:
 (unknown) [10745b16] log:
 ├─(unknown) [10745b16] has no known versions!
 └─found to have no compatible versions left with StatsBase [2913bbd2]
   └─StatsBase [2913bbd2] log:
     ├─possible versions are: [0.1.0, 0.2.0-0.2.1, 0.2.3-0.2.10, 0.3.0-0.3.13, 0.4.0-0.4.4, 0.5.0-0.5.3, 0.6.0-0.6.16, 0.7.0-0.7.4, 0.8.0-0.8.3, 0.9.0, 0.10.0, 0.11.0-0.11.1, 0.12.0, 0.13.0-0.13.1, 0.14.0-0.14.1, 0.15.0, 0.16.0-0.16.1, 0.17.0, 0.18.0, 0.19.0-0.19.5, 0.20.0-0.20.1, 0.22.0, 0.23.0-0.23.1, 0.24.0] or uninstalled
     └─restricted to versions 0.24.0 by an explicit requirement, leaving only versions 0.24.0

```

Any idea what’s happening and how to avoid these errors? And more importantly, where can one read more about the awesome-if-only-I-can-use-it Pkg3? Any help is appreciated. Thank you.

---

<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, 4:18pm UTC](https://discourse.julialang.org/t/pkg-resolve-fails-when-upgrading-to-v0-7/12272/2 "2018-07-09T16:18:39Z")

</div>

Stdlibs are not supported in REQUIRE files. Try remove it and run `resolve` again.

---

<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, 4:21pm UTC](https://discourse.julialang.org/t/pkg-resolve-fails-when-upgrading-to-v0-7/12272/3 "2018-07-09T16:21:41Z")

</div>

Yes, I encountered these errors this weekend also, as described in this thread

> [@Pkg(3): develop package which depends on local/unregistered package](https://discourse.julialang.org/t/pkg-3-develop-package-which-depends-on-local-unregistered-package/12164/12):
>
> 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 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: ├…

This problem occurs when you are working with the development version of an unregistered package, you need a `Project.toml` file in your directory and your `~/.julia/environments/v0.7/Manifest.toml` file needs to be pointing towards the `dev` version of the package instead of the github repo.

---

<div class="post-metadata">

**Author:** ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Post date:** [July 9, 2018, 4:45pm UTC](https://discourse.julialang.org/t/pkg-resolve-fails-when-upgrading-to-v0-7/12272/4 "2018-07-09T16:45:03Z")

</div>

Well it seems the issue is not with the package I am upgrading at all. I removed the package and `Pkg.resolve()` again and it is complaining about `BenchmarkTools` and some unknown package:

```julia
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package (unknown) [10745b16]:
 (unknown) [10745b16] log:
 ├─(unknown) [10745b16] has no known versions!
 └─found to have no compatible versions left with BenchmarkTools [6e4b80f9]
   └─BenchmarkTools [6e4b80f9] log:
     ├─possible versions are: [0.0.1-0.0.8, 0.2.0-0.2.5, 0.3.0-0.3.2] or uninstalled
     └─restricted to versions 0.3.2 by an explicit requirement, leaving only versions 0.3.2
Stacktrace:
 [1] #propagate_constraints!#61(::Bool, ::Function, ::Pkg.GraphType.Graph, ::Set{Int64}) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v0.7\Pkg\src\GraphType.jl:1005
 [2] propagate_constraints! at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v0.7\Pkg\src\GraphType.jl:946 [inlined]
 [3] #simplify_graph!#121(::Bool, ::Function, ::Pkg.GraphType.Graph, ::Set{Int64}) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v0.7\Pkg\src\GraphType.jl:1460
 [4] simplify_graph! at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v0.7\Pkg\src\GraphType.jl:1460 [inlined]
 [5] resolve_versions!(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v0.7\Pkg\src\Operations.jl:302
 [6] up(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v0.7\Pkg\src\Operations.jl:1113
 [7] #up#27(::Pkg.Types.UpgradeLevel, ::Pkg.Types.PackageMode, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v0.7\Pkg\src\API.jl:149
 [8] #up#22 at .\none:0 [inlined]
 [9] #up at .\none:0 [inlined]
 [10] resolve at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v0.7\Pkg\src\API.jl:154 [inlined] (repeats 2 times)
 [11] top-level scope at none:0

```

---

<div class="post-metadata">

**Author:** ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Post date:** [July 9, 2018, 5:02pm UTC](https://discourse.julialang.org/t/pkg-resolve-fails-when-upgrading-to-v0-7/12272/5 "2018-07-09T17:02:21Z")

</div>

Removing `BenchmarkTools` made it complain about `StatsBase`. Removing `StatsBase` made `Pkg.resolve()` work. Adding `KissThreading` and adding `Random` again to the REQUIRE file produced the same error again. It’s not clear to me what I should do now.

---

<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 9, 2018, 5:45pm UTC](https://discourse.julialang.org/t/pkg-resolve-fails-when-upgrading-to-v0-7/12272/6 "2018-07-09T17:45:00Z")

</div>

You should not add `Random` to `REQUIRE` because `Random` is in the standard library. I also got the confusing messages. Try removing `Random` from `REQUIRE` and running `resolve` again. I didn’t read the other posts in detail, but I had something similar. I think putting `import Random` in your main module file and then doing resolve might help. It doesn’t make sense; I doubt Pkg3 scans this file. But, you can try anyway. It won’t hurt.

---

<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 9, 2018, 5:50pm UTC](https://discourse.julialang.org/t/pkg-resolve-fails-when-upgrading-to-v0-7/12272/7 "2018-07-09T17:50:52Z")

</div>

Regarding unresolvable dependencies. This happened to me a few times. In my case, I had done `pkg> dev APack` in the past. Doing `pkg> remove APack` to remove it from the `dev` directory and then `pkg> add APack` worked for me. The dependencies were resolved. In other words, checking from where the packages in question are loaded might help.

---

<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 9, 2018, 5:56pm UTC](https://discourse.julialang.org/t/pkg-resolve-fails-when-upgrading-to-v0-7/12272/8 "2018-07-09T17:56:05Z")

</div>

> I cloned the package as an old habit since it is not registered, I suppose develop is the Pkg3 analogue. The package was installed in the .julia/dev folder.

Do you mean that you cloned or copied the package into `.julia/dev` manually ? I think you need to use `pkg> dev /path/to/KissThreading.jl` instead. If you give a local path, it will _not_ copy the repo, but will note add to your Project and Manifest files (or something like that). If it is a remote repo, even unregistered, then it _will_ be copied to `.julia/dev`.

---

<div class="post-metadata">

**Author:** ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Post date:** [July 9, 2018, 6:27pm UTC](https://discourse.julialang.org/t/pkg-resolve-fails-when-upgrading-to-v0-7/12272/9 "2018-07-09T18:27:01Z")

</div>

I used `Pkg.clone` initially, but now I am just using `dev`. I removed `Random` from the REQUIRE file. When I run the tests, I get:

```julia
ERROR: LoadError: LoadError: ArgumentError: Package KissThreading does not have Random in its dependencies:
 - If you have KissThreading checked out for development and have
   added Random 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 KissThreading.

```

which seems to be complaining about the package `Random`. Running `Pkg.resolve()` gives:

```julia
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package (unknown) [10745b16]:
 (unknown) [10745b16] log:
 ├─(unknown) [10745b16] has no known versions!
 └─found to have no compatible versions left with StatsBase [2913bbd2]
   └─StatsBase [2913bbd2] log:
     ├─possible versions are: [0.1.0, 0.2.0-0.2.1, 0.2.3-0.2.10, 0.3.0-0.3.13, 0.4.0-0.4.4, 0.5.0-0.5.3, 0.6.0-0.6.16, 0.7.0-0.7.4, 0.8.0-0.8.3, 0.9.0, 0.10.0, 0.11.0-0.11.1, 0.12.0, 0.13.0-0.13.1, 0.14.0-0.14.1, 0.15.0, 0.16.0-0.16.1, 0.17.0, 0.18.0, 0.19.0-0.19.5, 0.20.0-0.20.1, 0.22.0, 0.23.0-0.23.1, 0.24.0] or uninstalled
     └─restricted to versions 0.24.0 by an explicit requirement, leaving only versions 0.24.0

```

which shows that is is complaining about StatsBase.

`StatsBase` was added after `KissThreading` using `add StatsBase`. Removing `KissThreading` doesn’t remove the error. So I think the problem might be in `StatsBase`, I will open an issue there.

---

<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 9, 2018, 6:57pm UTC](https://discourse.julialang.org/t/pkg-resolve-fails-when-upgrading-to-v0-7/12272/10 "2018-07-09T18:57:39Z")

</div>

The package “(unknown)” is suspicious. I don’t recall seeing it myself, and the thread linked above does not contain the string “unknown”.

---

<div class="post-metadata">

**Author:** ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Post date:** [July 9, 2018, 7:00pm UTC](https://discourse.julialang.org/t/pkg-resolve-fails-when-upgrading-to-v0-7/12272/11 "2018-07-09T19:00:54Z")

</div>

Removing the .julia/v0.7 folder, running `init` again which didn’t bring the folder back so I assume it is obsolete, then using `dev StatsBase` instead of `add StatsBase` resolved the errors above. Also running tests from within Julia using `Pkg.test` seem to work when running the runtests.jl file from outside doesn’t. This seems like an orthogonal issue but now I am getting somewhere. Thanks for the help.

---

<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 10, 2018, 10:24am UTC](https://discourse.julialang.org/t/pkg-resolve-fails-when-upgrading-to-v0-7/12272/12 "2018-07-10T10:24:03Z")

</div>

Is this beta or nightly? Many bugs have been fixed on nightly so if possible, try that 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 10, 2018, 11:00am UTC](https://discourse.julialang.org/t/pkg-resolve-fails-when-upgrading-to-v0-7/12272/13 "2018-07-10T11:00:47Z")

</div>

BTW, can you please clarify how the `Pkg.jl` repo is merged to Julia `master`?

Does it happen on a regular schedule, or an ad hoc basis?

---

<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 10, 2018, 11:07am UTC](https://discourse.julialang.org/t/pkg-resolve-fails-when-upgrading-to-v0-7/12272/14 "2018-07-10T11:07:01Z")

</div>

Right now, ad hoc.

---

<div class="post-metadata">

**Author:** ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Post date:** [July 10, 2018, 1:15pm UTC](https://discourse.julialang.org/t/pkg-resolve-fails-when-upgrading-to-v0-7/12272/15 "2018-07-10T13:15:43Z")

</div>

Seems to be fine on nightly.

---

<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 10, 2018, 1:26pm UTC](https://discourse.julialang.org/t/pkg-resolve-fails-when-upgrading-to-v0-7/12272/16 "2018-07-10T13:26:08Z")

</div>

Thanks, that’s good to hear.
