I just updated and this happened:
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.0.2 (2018-11-08)
_/ |\__'_|_|_|\__'_| |
|__/ |
(v1.0) pkg> up
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Updating git-repo `https://github.com/stevengj/HCubature.jl.git`
Updating git-repo `https://github.com/juan-pablo-vielma/Clp.jl.git`
Updating git-repo `https://github.com/halleysfifthinc/MAT.jl`
Updating git-repo `https://github.com/JuliaPlots/Makie.jl.git`
Updating git-repo `https://github.com/JuliaPlots/AbstractPlotting.jl.git`
Updating git-repo `https://github.com/gdkrmr/WeightedOnlineStats.jl`
Updating git-repo `https://github.com/MikeInnes/Traceur.jl.git`
Resolving package versions...
Installed DataFrames โ v0.15.1
Installed PlotlyJS โโโ v0.12.1
Updating `~/.julia/environments/v1.0/Project.toml`
[a93c6f00] โ DataFrames v0.15.0 โ v0.15.1
[f0f68f2c] โ PlotlyJS v0.12.0 โ v0.12.1
Updating `~/.julia/environments/v1.0/Manifest.toml`
[a93c6f00] โ DataFrames v0.15.0 โ v0.15.1
[f0f68f2c] โ PlotlyJS v0.12.0 โ v0.12.1
ERROR: MethodError: no method matching getindex(::Nothing, ::String)
Stacktrace:
[1] build_versions at /build/julia/src/julia/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1034 [inlined]
[2] up(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /build/julia/src/julia/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1247
[3] #up#29(::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 /build/julia/src/julia/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:198
[4] up at /build/julia/src/julia/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:171 [inlined]
[5] do_up!(::Dict{Symbol,Any}, ::Array{Pkg.Types.PackageSpec,1}, ::Dict{Symbol,Any}) at /build/julia/src/julia/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:686
I'm on an updated Manjaro.
This means that you have an inconsistent manifest, have you modified it by hand? Can you put the Manifest.toml and Project.toml in a gist?
I've played with other (mine) packages, but not the files in .julia/environments
Here's the gist of the two files:
https://gist.github.com/yakir12/eefc15d052b3b6f9aff82486d21edfa9
I could build julia master just to detect the offending package, but is there a simpler way to do this...?
Wait for Julia 1.0.3 or Julia 1.1.0.
This seemed to work for me:
Manifest.toml and Project.toml~/.julia/environments/v1.0]add <all the packages I had before>, which I got from:using Pkg
path = "<path to the Project file>"
proj = Pkg.TOML.parsefile(joinpath(path, "Project.toml"))
join(sort(collect(keys(proj["deps"]))), " ")
ERROR: GitError(Code:EUNBORNBRANCH, Class:Reference, reference 'refs/heads/master' not found)
Now I'll try and add/dev the "offending" packages that resulted in those errors.
Hope this didn't brake my system... :smile:
OK, it didn't work. I'm getting the same kind of error...
(v1.0) pkg> dev /home/yakir/RayTraceEllipsoids
Resolving package versions...
Updating `~/.julia/environments/v1.0/Project.toml`
[a8abbff9] + RayTraceEllipsoids v0.1.0 [`~/RayTraceEllipsoids`]
Updating `~/.julia/environments/v1.0/Manifest.toml`
[a8abbff9] + RayTraceEllipsoids v0.1.0 [`~/RayTraceEllipsoids`]
julia> using RayTraceEllipsoids
[ Info: Recompiling stale cache file /home/yakir/.julia/compiled/v1.0/RayTraceEllipsoids/5hTBY.ji for RayTraceEllipsoids [a8abbff9-067c-52a9-bb2a-85c73151c183]
โ Warning: Package RayTraceEllipsoid does not have LinearAlgebra in its dependencies:
โ - If you have RayTraceEllipsoid checked out for development and have
โ added LinearAlgebra 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 RayTraceEllipsoid
โ Loading LinearAlgebra into RayTraceEllipsoid from project dependency, future warnings for RayTraceEllipsoid are suppressed.
ERROR: KeyError: key RayTraceEllipsoids [a8abbff9-067c-52a9-bb2a-85c73151c183] not found
OK, found part of the problem, and it resolved the whole issue. In the warning:
Warning: Package RayTraceEllipsoid does not have LinearAlgebra in its dependencies:
it complains about RayTraceEllipsoid and not RayTraceEllipsoids. So I forgot an 's' in the module RayTraceEllipsoid in the RayTraceEllipsoids.jl file...
Thanks for the time and sorry for the noise. I'm closing this because it seems like it hardly has to do with Pkg...
Hmm, back to this again, this time with no informative warning, so I can't really solve it in the same way as before. I updated the gist with the current Manifest.toml and Project.toml files.
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.0.2 (2018-11-08)
_/ |\__'_|_|_|\__'_| |
|__/ |
(v1.0) pkg> up
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Updating git-repo `https://github.com/JuliaPlots/StatsMakie.jl.git`
Updating git-repo `https://github.com/JuliaDiffEq/LabelledArrays.jl.git`
Updating git-repo `https://github.com/JuliaPlots/Makie.jl.git`
Updating git-repo `https://github.com/JuliaPlots/AbstractPlotting.jl.git`
Updating git-repo `https://github.com/JuliaPlots/GLMakie.jl.git`
Resolving package versions...
Updating `~/.julia/environments/v1.0/Project.toml`
[no changes]
Updating `~/.julia/environments/v1.0/Manifest.toml`
[no changes]
ERROR: MethodError: no method matching getindex(::Nothing, ::String)
Stacktrace:
[1] build_versions at /build/julia/src/julia/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1034 [inlined]
[2] up(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /build/julia/src/julia/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1247
[3] #up#29(::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 /build/julia/src/julia/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:198
[4] up at /build/julia/src/julia/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:171 [inlined]
[5] do_up!(::Dict{Symbol,Any}, ::Array{Pkg.Types.PackageSpec,1}, ::Dict{Symbol,Any}) at /build/julia/src/julia/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:686
Yea, you have a Manifest that does not make sense to Pkg. Probably because some package has changed its UUID. I think the problem is StatsMakie which in your manifest has a uuid that does not exist. pkg> rm -m StatsMakie; add StatsMakie fixes the problem.
Right! Thanks a ton!
Reproducible by trying to instantiate the Project.toml/Manifest.toml below. Basically just Example but I have switched the uuid for Example in both files.
Project.toml
[deps]
Example = "142fd7e7-7180-4195-909c-9c12203c7148"
Manfest.toml:
[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
[[Distributed]]
deps = ["LinearAlgebra", "Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
[[Example]]
deps = ["Test"]
git-tree-sha1 = "ca3820cc4e66f473467d912c4b2b3ae5dc968444"
repo-rev = "master"
repo-url = "https://github.com/JuliaLang/Example.jl.git"
uuid = "142fd7e7-7180-4195-909c-9c12203c7148"
version = "0.5.1+"
[[InteractiveUtils]]
deps = ["LinearAlgebra", "Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
[[Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
[[LinearAlgebra]]
deps = ["Libdl"]
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
[[Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
[[Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
[[Random]]
deps = ["Serialization"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
[[Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
[[Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
[[Test]]
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
This MWE is not a problem on master. Example will just be treated like an unregistered package, which is fine since it is being tracked by repo.
Most helpful comment
Reproducible by trying to instantiate the
Project.toml/Manifest.tomlbelow. Basically justExamplebut I have switched the uuid forExamplein both files.Project.tomlManfest.toml: