Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow use of a url and subdir in [sources] #4039

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/API.jl
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ function update_source_if_set(project, pkg)
if pkg.path !== nothing
source["path"] = pkg.path
end
if pkg.subdir !== nothing
source["subdir"] = pkg.subdir
end
path, repo = get_path_repo(project, pkg.name)
if path !== nothing
pkg.path = path
Expand All @@ -205,6 +208,9 @@ function update_source_if_set(project, pkg)
if repo.rev !== nothing
pkg.repo.rev = repo.rev
end
if repo.subdir !== nothing
pkg.repo.subdir = repo.subdir
end
end

function develop(ctx::Context, pkgs::Vector{PackageSpec}; shared::Bool=true,
Expand Down
2 changes: 1 addition & 1 deletion src/project.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ read_project_compat(raw, project::Project) =

read_project_sources(::Nothing, project::Project) = Dict{String,Any}()
function read_project_sources(raw::Dict{String,Any}, project::Project)
valid_keys = ("path", "url", "rev")
valid_keys = ("path", "url", "rev", "subdir")
sources = Dict{String,Any}()
for (name, source) in raw
if !(source isa AbstractDict)
Expand Down
Loading