Problems running Pkg.test with Pkg3 on v0.7.0-alpha

Starting from a a freshly build v0.7.0-alpha out of master, in a directory with no Project.toml or Manifest.toml, and with ~/.julia emptied, doing the following: ]add https://github.com/JuliaString/Strs.jl#master then test Strs gives an error, although doing using Strs the Julia REPL works (and shows that it’s precompiling).

(v0.7) pkg> test Strs.jl
   Testing Strs
ERROR: The following package names could not be resolved:
 * Strs (b50f87fc-6a30-11e8-0d3b-fbbdc9c1c4c1 in manifest but not in project)
Please specify by known `name=uuid`.

julia> using Strs
[ Info: Precompiling module Strs

julia> Pkg.test("Strs")
WARNING: Base.Pkg is deprecated, run `using Pkg` instead
 in module Main
   Testing Strs
ERROR: The following package names could not be resolved:
 * Strs (b50f87fc-6a30-11e8-0d3b-fbbdc9c1c4c1 in manifest but not in project)
Please specify by known `name=uuid`.
Stacktrace:
 [1] #ensure_resolved#25(::Bool, ::Function, ::Pkg.Types.EnvCache, ::Array{Pkg.Types.PackageSpec,1}) at /j/julia/usr/share/julia/stdlib/v0.7/Pkg/src/Types.jl:359
 [2] #ensure_resolved at ./<missing>:0 [inlined]
 [3] (::getfield(Pkg.Operations, Symbol("##35#37")){Bool,getfield(Pkg.Operations, Symbol("##59#61")),Pkg.Types.Context,Pkg.Types.PackageSpec,Pkg.Types.Context,Bool})(::String) at /j/julia/usr/share/julia/stdlib/v0.7/Pkg/src/Operations.jl:771
 [4] mktempdir(::getfield(Pkg.Operations, Symbol("##35#37")){Bool,getfield(Pkg.Operations, Symbol("##59#61")),Pkg.Types.Context,Pkg.Types.PackageSpec,Pkg.Types.Context,Bool}, ::String) at ./file.jl:564
 [5] mktempdir at ./file.jl:562 [inlined]
 [6] #with_dependencies_loadable_at_toplevel#33(::Bool, ::Function, ::Function, ::Pkg.Types.Context, ::Pkg.Types.PackageSpec) at /j/julia/usr/share/julia/stdlib/v0.7/Pkg/src/Operations.jl:741
 [7] #with_dependencies_loadable_at_toplevel at ./logging.jl:0 [inlined]
 [8] #test#57(::Bool, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /j/julia/usr/share/julia/stdlib/v0.7/Pkg/src/Operations.jl:1116
 [9] #test at ./<missing>:0 [inlined]
 [10] #test#35(::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /j/julia/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:216
 [11] test at /j/julia/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:205 [inlined]
 [12] #test#34 at /j/julia/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:202 [inlined]
 [13] test at /j/julia/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:202 [inlined]
 [14] #test#33 at /j/julia/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:201 [inlined]
 [15] test at /j/julia/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:201 [inlined]
 [16] #test#32 at /j/julia/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:200 [inlined]
 [17] test(::String) at /j/julia/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:200
 [18] top-level scope

I have similar issues, but with a different package

               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.7.0 (2018-08-08 06:46 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/                   |  x86_64-pc-linux-gnu

julia> using LinearAlgebra

(v0.7) pkg> up
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `git://github.com/JuliaRegistries/General.git`
 Resolving package versions...
ERROR: The following package names could not be resolved:
 * LinearAlgebra (37e2e46d-f89d-539d-b4ee-838fcccc9c8e in manifest but not in project)
Please specify by known `name=uuid`.

no further information is provided in the error message (no stack trace), so it’s hard to locate the source.
Maybe the code throwing the error could provide some more context? Which manifest/project is incorrect?

#package-manager

Edit: By copying the uuid for LinearAlgebra in ~/.julia/environments/v0.7/Manifest.toml and pasting it into ~/.julia/environments/v0.7/Project.toml I managed to solve the issue. I have no idea why the error occured though, have I accidentally added something to one of these files before perhaps?

Using the non REPL mode, e.g. Pkg.up() gives stacktraces.

But yes, that error message should be improved, there is an issue open about it.

2 Likes