KeyError: key "repo-rev" not found (v0.7)


#1

Trying to run pkg> status and I’m getting a very unclear error message. I assume something is not right with one of the dependencies, I have no idea which, what to do next or where the problem is.

(Genie) pkg> status
Project Genie v0.1.0
ERROR: KeyError: key "repo-rev" not found
Stacktrace:
 [1] name_ver_info(::Dict{String,Any}) at ./dict.jl:485
 [2] manifest_diff(::Pkg.Types.Context, ::Dict{String,Any}, ::Dict{String,Any}) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v0.7/Pkg/src/Display.jl:218
 [3] status(::Pkg.Types.Context, ::Pkg.Types.PackageMode, ::Bool) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v0.7/Pkg/src/Display.jl:55
 [4] status at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v0.7/Pkg/src/Display.jl:33 [inlined]
 [5] do_status!(::Pkg.Types.Context, ::Array{Union{Pkg.Types.VersionRange, String, Pkg.REPLMode.Command, Pkg.REPLMode.Option, Pkg.REPLMode.Rev},1}) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v0.7/Pkg/src/REPLMode.jl:688
 [6] #invokelatest#1 at ./essentials.jl:670 [inlined]
 [7] invokelatest at ./essentials.jl:669 [inlined]
 [8] do_cmd!(::Array{Union{Pkg.Types.VersionRange, String, Pkg.REPLMode.Command, Pkg.REPLMode.Option, Pkg.REPLMode.Rev},1}, ::REPL.LineEditREPL) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v0.7/Pkg/src/REPLMode.jl:275
 [9] #do_cmd#8(::Bool, ::Function, ::REPL.LineEditREPL, ::String) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v0.7/Pkg/src/REPLMode.jl:235
 [10] do_cmd at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v0.7/Pkg/src/REPLMode.jl:232 [inlined]
 [11] (::getfield(Pkg.REPLMode, Symbol("##27#30")){REPL.LineEditREPL,REPL.LineEdit.Prompt})(::REPL.LineEdit.MIState, ::Base.GenericIOBuffer{Array{UInt8,1}}, ::Bool) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v0.7/Pkg/src/REPLMode.jl:950
 [12] top-level scope

#2

Just open issues like this on the Pkg repo instead. No need to spam “usage” with eventual Pkg bugs :slight_smile:


#3

Sure :slight_smile:


#4

When I encounter some problem and I’m unsure whether it’s my fault or it is a Julia or some package bug, I usually come here asking for help to triage the problem, since it seems to me that the Github issues is the place not to be spammed :slight_smile:
Shouln’t it be like that?


#5

Well, Pkg is quite new and it is likely to have some bugs. Also since it is new, not many users here will have answers like with normal julia questions. An error message like this is unacceptable no matter what so it is good to open an issue here.


#6

OK, fair enough.


#7

@kristoffer.carlsson Maybe you can throw me a rope here, I still don’t know what to do. I just removed REQUIRE, Project.toml and Manifest.toml just thinking that I can start over with a clean state, add all packages, etc.

And then,

Step 1 :white_check_mark::

(Genie) pkg> generate Genie
Generating project Genie:
    Genie/Project.toml
    Genie/src/Genie.jl

Step 2 :boom::

(Genie) pkg> st
Project Genie v0.1.0
ERROR: KeyError: key "repo-rev" not found
Stacktrace:
 [1] name_ver_info(::Dict{String,Any}) at ./dict.jl:478
 [2] manifest_diff(::Pkg.Types.Context, ::Dict{String,Any}, ::Dict{String,Any}) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v0.7/Pkg/src/Display.jl:226
 [3] status(::Pkg.Types.Context, ::Pkg.Types.PackageMode, ::Bool) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v0.7/Pkg/src/Display.jl:57
 [4] status at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v0.7/Pkg/src/Display.jl:33 [inlined]
 [5] do_status!(::Pkg.Types.Context, ::Array{Union{VersionRange, String, Command, Option, Rev},1}) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v0.7/Pkg/src/REPLMode.jl:748
 [6] #invokelatest#1 at ./essentials.jl:691 [inlined]
 [7] invokelatest at ./essentials.jl:690 [inlined]
 [8] do_cmd!(::Array{Union{VersionRange, String, Command, Option, Rev},1}, ::REPL.LineEditREPL) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v0.7/Pkg/src/REPLMode.jl:346
 [9] #do_cmd#10(::Bool, ::Function, ::REPL.LineEditREPL, ::String) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v0.7/Pkg/src/REPLMode.jl:281
 [10] do_cmd at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v0.7/Pkg/src/REPLMode.jl:278 [inlined]
 [11] (::getfield(Pkg.REPLMode, Symbol("##26#29")){REPL.LineEditREPL,REPL.LineEdit.Prompt})(::REPL.LineEdit.MIState, ::Base.GenericIOBuffer{Array{UInt8,1}}, ::Bool) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v0.7/Pkg/src/REPLMode.jl:1067
 [12] #invokelatest#1 at ./essentials.jl:691 [inlined]
 [13] invokelatest at ./essentials.jl:690 [inlined]
 [14] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v0.7/REPL/src/LineEdit.jl:2261
 [15] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v0.7/REPL/src/REPL.jl:1029
 [16] run_repl(::REPL.AbstractREPL, ::Any) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v0.7/REPL/src/REPL.jl:191
 [17] (::getfield(Base, Symbol("##831#833")){Bool,Bool,Bool,Bool})(::Module) at ./logging.jl:311
 [18] #invokelatest#1 at ./essentials.jl:691 [inlined]
 [19] invokelatest at ./essentials.jl:690 [inlined]
 [20] macro expansion at ./logging.jl:308 [inlined]
 [21] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./client.jl:340
 [22] exec_options(::Base.JLOptions) at ./client.jl:252
 [23] _start() at ./client.jl:432

No Manifest file was created. Project.toml looks like this:

authors = ["Adrian Salceanu <e@essenciary.com>"]
name = "Genie"
uuid = "fa5f4624-9e2b-11e8-31ab-154a7c554cc7"
version = "0.1.0"

[deps]

julia> versioninfo()
Julia Version 0.7.0-rc2.0
Commit 78540cba4c (2018-08-02 19:14 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin14.5.0)
CPU: Intel® Core™ i7-6820HQ CPU @ 2.70GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.0 (ORCJIT, skylake)


#8
(Genie) pkg> generate Genie

If you where in a clean slate the prompt would not say Genie. You can look at Base.active_project() to see which is the current project you are using which seems to have a hand edited invalid Manifest file.


#9

It seems that the problem was the one we discussed a while ago: dev did not bring the latest codebase from Github. The old Project, Manifest and REQUIRE were still present, though they were not on Github master anymore. I had to do a manual git pull into dev/Genie and then they were removed.


#10

@kristoffer.carlsson This is what it looks now


#11

activate . seems to make it show (Genie) regardless of the existence of a Project file?


#12

If you activate . it will set the current directory as the active project and create a project + manifest the first time you add a package.


#13

Thanks @kristoffer.carlsson

I can confirm that it has created the files – but it didn’t add required info.
I now get:

(v0.7) pkg> resolve
 Resolving package versions...
ERROR: expected a `name` entry in project file at /Users/adrian/.julia/dev/Genie/Project.toml

I presume I should now manually edit the file? Cheers


P.S. what do you think of automatically activating the local environment if a Project file is present?