Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pkg.resolve() throws error: KeyError: key "version" not found #27558

Closed
dlfivefifty opened this issue Jun 13, 2018 · 12 comments
Closed

Pkg.resolve() throws error: KeyError: key "version" not found #27558

dlfivefifty opened this issue Jun 13, 2018 · 12 comments

Comments

@dlfivefifty
Copy link
Contributor

julia> Pkg.resolve()
  Updating registry at `~/.julia/registries/Uncurated`
  Updating git-repo `https://github.com/JuliaRegistries/Uncurated.git`
ERROR: KeyError: key "version" not found
Stacktrace:
 [1] getindex at ./dict.jl:487 [inlined]
 [2] up(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /Users/sheehanolver/Projects/julia7/usr/share/julia/stdlib/v0.7/Pkg/src/Operations.jl:996
 [3] #up#22(::Pkg.Types.UpgradeLevel, ::Pkg.Types.PackageMode, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /Users/sheehanolver/Projects/julia7/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:149
 [4] #up#21 at ./none:0 [inlined]
 [5] #up at ./none:0 [inlined]
 [6] #up#18 at /Users/sheehanolver/Projects/julia7/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:122 [inlined]
 [7] #up at ./none:0 [inlined]
 [8] resolve() at /Users/sheehanolver/Projects/julia7/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:154
 [9] top-level scope at none:0
@dlfivefifty
Copy link
Contributor Author

This apparently makes it impossible to update certain packages due to:

ArgumentError: Package FastTransforms does not have AbstractFFTs in its dependencies:
 - If you have FastTransforms checked out for development and have
   added AbstractFFTs 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 FastTransforms.

@KristofferC
Copy link
Sponsor Member

Should be fixed by f0390db#diff-ee8106cfedf28064b893d9858fa83a12R1027

@KristofferC
Copy link
Sponsor Member

Please try with newest master.

@dlfivefifty
Copy link
Contributor Author

Nope still broken:

               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.7.0-alpha.120 (2018-06-13 13:37 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 8e04f8deab (0 days old master)
|__/                   |  x86_64-apple-darwin17.5.0

julia> Pkg.resolve()
  Updating registry at `~/.julia/registries/Uncurated`
  Updating git-repo `https://github.com/JuliaRegistries/Uncurated.git`
ERROR: KeyError: key "version" not found
Stacktrace:
 [1] getindex at ./dict.jl:487 [inlined]
 [2] up(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /Users/sheehanolver/Projects/julia7/usr/share/julia/stdlib/v0.7/Pkg/src/Operations.jl:1062
 [3] #up#27(::Pkg.Types.UpgradeLevel, ::Pkg.Types.PackageMode, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /Users/sheehanolver/Projects/julia7/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:149
 [4] #up#26 at ./none:0 [inlined]
 [5] #up at ./none:0 [inlined]
 [6] #up#23 at /Users/sheehanolver/Projects/julia7/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:122 [inlined]
 [7] #up at ./none:0 [inlined]
 [8] resolve() at /Users/sheehanolver/Projects/julia7/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:154
 [9] top-level scope at none:0

@KristofferC
Copy link
Sponsor Member

Ok, any repro?

@dlfivefifty
Copy link
Contributor Author

Ok, any repro?

What do you mean?

@KristofferC
Copy link
Sponsor Member

Reproducer. Is it possible to give instructions that I can execute that would give the same error?

@dlfivefifty
Copy link
Contributor Author

dlfivefifty commented Jun 13, 2018

This is what I did:

git checkout https://github.com/MikaelSlevinsky/FastTransforms.jl
julia -e "Pkg.develop(\"/path/to/FastTransforms.jl\")"

Then in julia

julia> using FastTransforms
ArgumentError: Package FastTransforms does not have AbstractFFTs in its dependencies:
 - If you have FastTransforms checked out for development and have
   added AbstractFFTs 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 FastTransforms.

julia> Pkg.resolve()

Oddly, using FastTransforms works now, so perhaps my .julia folder is in a weird state.

EDIT: No it doesn't, I still get the ArgumentError.

@KristofferC
Copy link
Sponsor Member

KristofferC commented Jun 13, 2018

Can you try do all of this in a new environment to isolate it from other things:

shell> mkdir isolation

shell> cd isolation
/Users/kristoffer/isolation

(v0.7) pkg> init
Initialized project at /Users/kristoffer/isolation/Project.toml

(isolation) pkg> dev ~/FastTransforms.jl
┌ Warning: packages will require to have a [Julia]Project.toml file in the future
└ @ Pkg.Types Types.jl:588
 Resolving package versions...
  Updating `Project.toml`
  [057dd010] + FastTransforms v0.3.2+ [`~/FastTransforms.jl`]
  Updating `Manifest.toml`
  [621f4979] + AbstractFFTs v0.3.1
  [9e28174c] + BinDeps v0.8.8
 ...

julia> using FastTransforms
[ Info: Precompiling module FastTransforms
...
ERROR: LoadError: ArgumentError: Module FFTW not found in current path.
Run `Pkg.add("FFTW")` to install the FFTW package.

which is because FastTransforms doesn't declare a dependency on FFTW.

Adding FFTW to the REQUIRE file, it now errors at

ERROR: LoadError: LoadError: LoadError: UndefVarError: REDFT01 not defined
Stacktrace:
 [1] top-level scope at none:0

@dlfivefifty
Copy link
Contributor Author

dlfivefifty commented Jun 13, 2018

OK, doing that I can't reproduce it, so let's just assume that my .julia got in a weird state and close this.

EDIT: Wiping .julia and starting from scratch has indeed helped.

@KristofferC
Copy link
Sponsor Member

Well, we don't want things to randomly go into bad states so it would be good to get to the bottom of this. Please report if it happens again.

@dlfivefifty
Copy link
Contributor Author

I wouldn't call it "randomly" if I updated Julia half-way through.... will definitely report again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants