From 46c0c20caaf813d20158a4ab2da3a8302eb6994a Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Sat, 25 May 2019 01:19:44 +0200 Subject: [PATCH] Make sure we have found the registry path when developing packages, fixes #1206. --- src/Types.jl | 1 + test/api.jl | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/Types.jl b/src/Types.jl index 3e7a5177d8..7588a3e02f 100644 --- a/src/Types.jl +++ b/src/Types.jl @@ -1300,6 +1300,7 @@ end # Return most current package info for a registered UUID function registered_info(env::EnvCache, uuid::UUID, key::String) + haskey(env.paths, uuid) || find_registered!(env, [uuid]) paths = env.paths[uuid] isempty(paths) && pkgerror("`$uuid` is not registered") values = [] diff --git a/test/api.jl b/test/api.jl index d072ada846..6102138781 100644 --- a/test/api.jl +++ b/test/api.jl @@ -73,6 +73,7 @@ end @testset "Pkg.develop" begin temp_pkg_dir() do project_path; cd_tempdir() do tmpdir; + exuuid = UUID("7876af07-990d-54b4-ab0e-23690620f79a") # UUID of Example.jl entry = nothing # explicit relative path with_temp_env() do env_path @@ -110,6 +111,16 @@ end end end end + # name + uuid + with_temp_env() do env_path + Pkg.develop(PackageSpec(name = "Example", uuid = exuuid)) + @test Pkg.Types.Context().env.manifest[exuuid].version > v"0.5" + end + # uuid + with_temp_env() do env_path + Pkg.develop(PackageSpec(uuid = exuuid)) + @test Pkg.Types.Context().env.manifest[exuuid].version > v"0.5" + end # name + local with_temp_env() do env_path Pkg.develop("Example"; shared=false)