I’ve been running into a strange problem ever since the switch on master to Pkg3 building one of my packages (which works fine still on v0.6.2, and older versions of v0.7).
For some reason, a Char
is being passed to the save
function in:
[1] #find_registered!#37(::Bool, ::Function, ::Pkg.Types.EnvCache, ::Array{String,1}, ::Array{Base.UUID,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/Types.jl:1057.
Any ideas what is going wrong, and how to fix or work around this?
# Lookup package names & uuids in a single pass through registries
function find_registered!(env::EnvCache,
names::Vector{String},
uuids::Vector{UUID}=UUID[];
force::Bool=false,
)::Nothing
# only look if there's something new to see (or force == true)
names = filter(name -> !haskey(env.uuids, name), names)
uuids = filter(uuid -> !haskey(env.paths, uuid), uuids)
!force && isempty(names) && isempty(uuids) && return
# since we're looking anyway, look for everything
save(name::String) =
name in names || haskey(env.uuids, name) || push!(names, name)
save(uuid::UUID) =
uuid in uuids || haskey(env.paths, uuid) || push!(uuids, uuid)
# lookup any dependency in the project file
for (name, uuid) in env.project["deps"]
save(name); save(UUID(uuid)) # THIS IS LINE 1057
end
$ julia -e 'versioninfo()'
WARNING: Base.versioninfo is deprecated: it has been moved to the standard library package `InteractiveUtils`.
Add `using InteractiveUtils` to your imports.
in module Main
Julia Version 0.7.0-DEV.5187
Commit 13b2f2be52 (2018-05-23 21:58 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: AMD EPYC 7401P 24-Core Processor
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.0 (ORCJIT, znver1)
Environment:
TRAVIS_JULIA_VERSION = nightly
0.00s$ if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
The command "if [[ -a .git/shallow ]]; then git fetch --unshallow; fi" exited with 0.
29.73s$ julia -e 'if VERSION < v"0.7.0-DEV" ; Pkg.add("Compat") ; Pkg.clone(pwd()) ; else ; using Pkg ; Pkg.add("Compat") ; Pkg.add(pwd()) ; end ; Pkg.build("Format"); Pkg.test("Format"; coverage=true)'
Cloning default registries into /home/travis/.julia/registries
Cloning registry Uncurated from "https://github.com/JuliaRegistries/Uncurated.git"
Updating registry at `~/.julia/registries/Uncurated`
Updating git-repo `https://github.com/JuliaRegistries/Uncurated.git`
ERROR: MethodError: no method matching (::getfield(Pkg.Types, Symbol("#save#45")){Pkg.Types.EnvCache})(::Char)
Closest candidates are:
save(!Matched::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/Types.jl:1050
save(!Matched::Base.UUID) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/Types.jl:1052
Stacktrace:
[1] #find_registered!#37(::Bool, ::Function, ::Pkg.Types.EnvCache, ::Array{String,1}, ::Array{Base.UUID,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/Types.jl:1057
[2] find_registered! at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/Types.jl:1045 [inlined]
[3] registry_resolve!(::Pkg.Types.EnvCache, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/Types.jl:934
[4] #add_or_develop#8(::Symbol, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:35
[5] #add_or_develop at ./<missing>:0 [inlined]
[6] #add_or_develop#7 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:22 [inlined]
[7] #add_or_develop at ./<missing>:0 [inlined]
[8] #add_or_develop#6 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:21 [inlined]
[9] #add_or_develop at ./<missing>:0 [inlined]
[10] #add_or_develop#5 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:20 [inlined]
[11] #add_or_develop at ./<missing>:0 [inlined]
[12] #add#9 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:43 [inlined]
[13] add(::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:43
[14] top-level scope at none:1