Skip to content

Commit

Permalink
Merge #1207
Browse files Browse the repository at this point in the history
1207: Make sure we have found the registry path when developing r=fredrikekre a=fredrikekre

Make sure we have found the registry path when developing packages, fixes #1206.

Co-authored-by: Fredrik Ekre <[email protected]>
  • Loading branch information
bors[bot] and fredrikekre committed May 26, 2019
2 parents 34d921e + 46c0c20 commit cee1d07
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down
11 changes: 11 additions & 0 deletions test/api.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit cee1d07

Please sign in to comment.