JuliaLang / Pkg.jl

Pkg - Package manager for the Julia programming language
https://pkgdocs.julialang.org
Other
622 stars 268 forks source link

MethodError when trying to update in the Pkg manager (v1.0) #1122

Closed mcfefa closed 5 years ago

mcfefa commented 5 years ago

When I try to update my packages using the Pkg manager, I get a MethodError as shown below. Does anyone have a suggestion on what I need to do to fix this?

MLC02V607JHV2Q:Cancer.jl mcfefa$ julia1.0
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.0.0 (2018-08-08)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(v1.0) pkg> activate .

(Cancer) pkg> update
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Updating git-repo `https://github.com/BioJulia/BioSequences.jl.git`
  Updating git-repo `https://github.com/JuliaDiffEq/DiffEqTutorials.jl`
  Updating git-repo `https://github.com/BioJulia/IntervalTrees.jl.git`
 Resolving package versions...
 Installed ArbNumerics ─ v0.3.9
 Installed Optim ─────── v0.18.1
  Updating `Project.toml`
  [1130ab10] ↑ DiffEqParamEstim v1.3.1 ⇒ v1.6.0
  [0c46a032] ↑ DifferentialEquations v5.2.1 ⇒ v6.3.0
  [429524aa] ↑ Optim v0.16.0 ⇒ v0.18.1
  [65888b18] ↑ ParameterizedFunctions v3.10.0 ⇒ v4.1.1
  [91a5bcdd] ↑ Plots v0.19.3 ⇒ v0.23.2
  [731186ca] ↑ RecursiveArrayTools v0.17.2 ⇒ v0.20.0
  [295af30f] ↑ Revise v0.7.15 ⇒ v2.0.1
  [47aef6b3] ↑ SimpleWeightedGraphs v0.5.0 ⇒ v1.1.0
  [682df890] ↑ Stan v3.5.0 ⇒ v4.0.0
  Updating `Manifest.toml`
  [1520ce14] + AbstractTrees v0.2.1
  [79e6a3ab] + Adapt v0.4.2
  [4fba245c] + ArrayInterface v0.1.1
  [764a87c0] ↑ BoundaryValueDiffEq v2.1.1 ⇒ v2.2.3
  [8bab3169] - ChunkedArrays v0.1.1
  [da1fd8a2] + CodeTracking v0.4.0
  [7ad07ef1] + CoupledFields v0.1.0
  [bcd4f6db] ↑ DelayDiffEq v4.4.1 ⇒ v5.2.0
  [39dd38d3] + Dierckx v0.4.1
  [2b5f629d] ↑ DiffEqBase v4.21.3 ⇒ v5.5.1
  [eb300fae] - DiffEqBiological v3.3.1
  [459566f4] ↑ DiffEqCallbacks v2.1.0 ⇒ v2.5.2
  [f3b72e0c] - DiffEqDevTools v2.5.0
  [c894b116] ↑ DiffEqJump v5.1.2 ⇒ v6.1.1
  [78ddff82] ↑ DiffEqMonteCarlo v0.13.2 ⇒ v0.14.0
  [77a26b50] ↑ DiffEqNoiseProcess v2.3.2 ⇒ v3.1.0
  [9fdde737] ↑ DiffEqOperators v3.2.1 ⇒ v3.4.0
  [34035eb4] - DiffEqPDEBase v0.4.0
  [1130ab10] ↑ DiffEqParamEstim v1.3.1 ⇒ v1.6.0
  [055956cb] ↑ DiffEqPhysics v3.0.0 ⇒ v3.1.0
  [41bf760c] ↑ DiffEqSensitivity v2.1.1 ⇒ v3.0.2
  [ef61062a] - DiffEqUncertainty v1.0.0
  [0c46a032] ↑ DifferentialEquations v5.2.1 ⇒ v6.3.0
  [c619ae07] ↑ DimensionalPlotRecipes v0.1.1 ⇒ v0.2.0
  [497a8b3b] ↑ DoubleFloats v0.5.6 ⇒ v0.7.15
  [da5c29d0] - EllipsisNotation v0.3.0
  [587475ba] + Flux v0.8.1
  [c91e804a] + Gadfly v1.0.1
  [14197337] + GenericLinearAlgebra v0.1.0
  [4d00f742] ↑ GeometryTypes v0.6.2 ⇒ v0.7.3
  [a1b4810d] + Hexagons v0.2.0
  [e91730f6] ↑ Hungarian v0.3.0 ⇒ v0.4.0
  [9b13fd28] + IndirectArrays v0.5.0
  [4076af6c] ↑ JuMP v0.18.5 ⇒ v0.19.0
  [aa1ae85d] + JuliaInterpreter v0.3.2
  [6f1432cf] + LoweredCodeUtils v0.2.0
  [5424a776] + Mamba v0.12.0
  [f9640e96] ↑ MultiScaleArrays v1.2.0 ⇒ v1.4.0
  [872c559c] + NNlib v0.5.0
  [429524aa] ↑ Optim v0.16.0 ⇒ v0.18.1
  [1dea7af3] ↑ OrdinaryDiffEq v4.13.0 ⇒ v5.4.1
  [65888b18] ↑ ParameterizedFunctions v3.10.0 ⇒ v4.1.1
  [91a5bcdd] ↑ Plots v0.19.3 ⇒ v0.23.2
  [e409e4f3] ↑ PoissonRandom v0.2.0 ⇒ v0.4.0
  [3cdcf5f2] ↑ RecipesBase v0.5.0 ⇒ v0.6.0
  [731186ca] ↑ RecursiveArrayTools v0.17.2 ⇒ v0.20.0
  [ae5879a3] ↑ ResettableStacks v0.4.1 ⇒ v0.6.0
  [89212889] - ReverseDiffSparse v0.8.6
  [295af30f] ↑ Revise v0.7.15 ⇒ v2.0.1
  [47aef6b3] ↑ SimpleWeightedGraphs v0.5.0 ⇒ v1.1.0
  [682df890] ↑ Stan v3.5.0 ⇒ v4.0.0
  [90137ffa] ↑ StaticArrays v0.8.3 ⇒ v0.10.3
  [9672c7b4] ↑ SteadyStateDiffEq v1.2.0 ⇒ v1.4.0
  [789caeaf] ↑ StochasticDiffEq v5.8.0 ⇒ v6.1.1
  [c3572dad] ↑ Sundials v2.3.3 ⇒ v3.3.0
  [9f7883ad] + Tracker v0.1.0
  [3bb67fe8] ↑ TranscodingStreams v0.8.1 ⇒ v0.9.3
  [0e69188a] - VectorizedRoutines v0.1.0
  [44d3d7a6] ↑ Weave v0.6.2 ⇒ v0.9.0
  [a5390f91] + ZipFile v0.8.0
ERROR: MethodError: no method matching getindex(::Nothing, ::String)
Stacktrace:
 [1] #build_versions#45(::Bool, ::Function, ::Pkg.Types.Context, ::Array{Base.UUID,1}) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1016
 [2] build_versions at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1005 [inlined]
 [3] up(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1209
 [4] #up#31(::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 /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:184
 [5] up at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:158 [inlined]
 [6] do_up!(::Dict{Symbol,Any}, ::Array{Pkg.Types.PackageSpec,1}, ::Dict{Symbol,Any}) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:610
 [7] #invokelatest#1(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Any, ::Any, ::Vararg{Any,N} where N) at ./essentials.jl:686
 [8] invokelatest(::Any, ::Any, ::Vararg{Any,N} where N) at ./essentials.jl:685
 [9] do_cmd!(::Pkg.REPLMode.PkgCommand, ::REPL.LineEditREPL) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:542
 [10] #do_cmd#30(::Bool, ::Function, ::REPL.LineEditREPL, ::String) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:507
 [11] do_cmd at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:503 [inlined]
 [12] (::getfield(Pkg.REPLMode, Symbol("##41#44")){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/v1.0/Pkg/src/REPLMode.jl:842
 [13] #invokelatest#1 at ./essentials.jl:686 [inlined]
 [14] invokelatest at ./essentials.jl:685 [inlined]
 [15] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/REPL/src/LineEdit.jl:2261
 [16] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:1029
 [17] run_repl(::REPL.AbstractREPL, ::Any) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:191
 [18] (::getfield(Base, Symbol("##720#722")){Bool,Bool,Bool,Bool})(::Module) at ./logging.jl:311
 [19] #invokelatest#1 at ./essentials.jl:686 [inlined]
 [20] invokelatest at ./essentials.jl:685 [inlined]
 [21] macro expansion at ./logging.jl:308 [inlined]
 [22] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./client.jl:330
 [23] exec_options(::Base.JLOptions) at ./client.jl:242
 [24] _start() at ./client.jl:421

(Cancer) pkg> 

I've tried this sequence on both v0.7 and v1.0 and it has resulted in the same error message. resolve runs without error and I've been able to use IJulia, but I don't think my packages are updating appropriately. Any insights on what I may be doing wrong would be greatly appreciated.

KristofferC commented 5 years ago

Restarting julia and just executing build should rebuild the packages. Your packages should have been updated by this point. This should be fixed on master which will be in 1.2 julia release.

mcfefa commented 5 years ago

Thanks @KristofferC

It looks like you are right, my packages did update. However there was an error trying to build Cairo, which I'm guessing is what is causing the error MethodError when I try to update. I'll be sure to get the 1.2 julia release to avoid the issue in the future.

MLC02V607JHV2Q:Cancer.jl mcfefa$ julia1.0
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.0.0 (2018-08-08)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(v1.0) pkg> activate .

(Cancer) pkg> build
  Building Electron ────────→ `~/.julia/packages/Electron/AHiDq/deps/build.log`
  Building LibCURL ─────────→ `~/.julia/packages/LibCURL/khRkY/deps/build.log`
  Building WinRPM ──────────→ `~/.julia/packages/WinRPM/Y9QdZ/deps/build.log`
  Building Homebrew ────────→ `~/.julia/packages/Homebrew/s09IX/deps/build.log`
  Building Cairo ───────────→ `~/.julia/packages/Cairo/CXPG1/deps/build.log`
┌ Error: Error building `Cairo`: 
│ 
│ signal (11): Segmentation fault: 11
│ in expression starting at /Users/mcfefa/.julia/packages/Cairo/CXPG1/deps/build.jl:165
│ _platform_strcmp at /usr/lib/system/libsystem_platform.dylib (unknown line)
│ Allocations: 17996674 (Pool: 17994119; Big: 2555); GC: 40
└ @ Pkg.Operations /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1068
  Building Rsvg ────────────→ `~/.julia/packages/Rsvg/uwc9D/deps/build.log`
  Building NodeJS ──────────→ `~/.julia/packages/NodeJS/rx0mH/deps/build.log`
  Building VegaLite ────────→ `~/.julia/packages/VegaLite/5UYyY/deps/build.log`
  Building SpecialFunctions → `~/.julia/packages/SpecialFunctions/fvheQ/deps/build.log`
  Building SymEngine ───────→ `~/.julia/packages/SymEngine/6KyFJ/deps/build.log`
  Building CodecZlib ───────→ `~/.julia/packages/CodecZlib/9jDi1/deps/build.log`
  Building Arpack ──────────→ `~/.julia/packages/Arpack/UiiMc/deps/build.log`
  Building Rmath ───────────→ `~/.julia/packages/Rmath/Py9gH/deps/build.log`
  Building Conda ───────────→ `~/.julia/packages/Conda/CpuvI/deps/build.log`
  Building FFTW ────────────→ `~/.julia/packages/FFTW/p7sLQ/deps/build.log`
  Building BlossomV ────────→ `~/.julia/packages/BlossomV/vKHKD/deps/build.log`
  Building GLPK ────────────→ `~/.julia/packages/GLPK/rw631/deps/build.log`
  Building ZMQ ─────────────→ `~/.julia/packages/ZMQ/ABGOx/deps/build.log`
  Building MbedTLS ─────────→ `~/.julia/packages/MbedTLS/X4xar/deps/build.log`
  Building IJulia ──────────→ `~/.julia/packages/IJulia/9ajf8/deps/build.log`
  Building GR ──────────────→ `~/.julia/packages/GR/IVBgs/deps/build.log`
  Building Plots ───────────→ `~/.julia/packages/Plots/QYETN/deps/build.log`
  Building Sundials ────────→ `~/.julia/packages/Sundials/eAJ5O/deps/build.log`
  Building ZipFile ─────────→ `~/.julia/packages/ZipFile/p60bh/deps/build.log`
  Building Dierckx ─────────→ `~/.julia/packages/Dierckx/9SY4A/deps/build.log`

(Cancer) pkg> update
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Updating git-repo `https://github.com/BioJulia/BioSequences.jl.git`
  Updating git-repo `https://github.com/JuliaDiffEq/DiffEqTutorials.jl`
  Updating git-repo `https://github.com/BioJulia/IntervalTrees.jl.git`
 Resolving package versions...
 Installed Revise ─ v2.0.2
  Updating `Project.toml`
  [295af30f] ↑ Revise v2.0.1 ⇒ v2.0.2
  Updating `Manifest.toml`
  [295af30f] ↑ Revise v2.0.1 ⇒ v2.0.2
ERROR: MethodError: no method matching getindex(::Nothing, ::String)
Stacktrace:
 [1] #build_versions#45(::Bool, ::Function, ::Pkg.Types.Context, ::Array{Base.UUID,1}) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1016
 [2] build_versions at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1005 [inlined]
 [3] up(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1209
 [4] #up#31(::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 /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:184
 [5] up at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:158 [inlined]
 [6] do_up!(::Dict{Symbol,Any}, ::Array{Pkg.Types.PackageSpec,1}, ::Dict{Symbol,Any}) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:610
 [7] #invokelatest#1(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Any, ::Any, ::Vararg{Any,N} where N) at ./essentials.jl:686
 [8] invokelatest(::Any, ::Any, ::Vararg{Any,N} where N) at ./essentials.jl:685
 [9] do_cmd!(::Pkg.REPLMode.PkgCommand, ::REPL.LineEditREPL) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:542
 [10] #do_cmd#30(::Bool, ::Function, ::REPL.LineEditREPL, ::String) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:507
 [11] do_cmd at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:503 [inlined]
 [12] (::getfield(Pkg.REPLMode, Symbol("##41#44")){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/v1.0/Pkg/src/REPLMode.jl:842
 [13] #invokelatest#1 at ./essentials.jl:686 [inlined]
 [14] invokelatest at ./essentials.jl:685 [inlined]
 [15] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/REPL/src/LineEdit.jl:2261
 [16] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:1029
 [17] run_repl(::REPL.AbstractREPL, ::Any) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:191
 [18] (::getfield(Base, Symbol("##720#722")){Bool,Bool,Bool,Bool})(::Module) at ./logging.jl:311
 [19] #invokelatest#1 at ./essentials.jl:686 [inlined]
 [20] invokelatest at ./essentials.jl:685 [inlined]
 [21] macro expansion at ./logging.jl:308 [inlined]
 [22] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./client.jl:330
 [23] exec_options(::Base.JLOptions) at ./client.jl:242
 [24] _start() at ./client.jl:421

(Cancer) pkg> 
KristofferC commented 5 years ago

Should be fixed