Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
staticfloat committed Sep 9, 2020
1 parent 3ab591f commit a1eb91e
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 825 deletions.
6 changes: 3 additions & 3 deletions src/API.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ for f in (:develop, :add, :rm, :up, :pin, :free, :test, :build, :status)
end

function develop(ctx::Context, pkgs::Vector{PackageSpec}; shared::Bool=true,
preserve::PreserveLevel=PRESERVE_TIERED, platform::Platform=Platform(), kwargs...)
preserve::PreserveLevel=PRESERVE_TIERED, platform::AbstractPlatform=HostPlatform(), kwargs...)
require_not_empty(pkgs, :develop)
foreach(pkg -> check_package_name(pkg.name, :develop), pkgs)
pkgs = deepcopy(pkgs) # deepcopy for avoid mutating PackageSpec members
Expand Down Expand Up @@ -135,7 +135,7 @@ function develop(ctx::Context, pkgs::Vector{PackageSpec}; shared::Bool=true,
end

function add(ctx::Context, pkgs::Vector{PackageSpec}; preserve::PreserveLevel=PRESERVE_TIERED,
platform::Platform=Platform(), kwargs...)
platform::AbstractPlatform=HostPlatform(), kwargs...)
require_not_empty(pkgs, :add)
foreach(pkg -> check_package_name(pkg.name, :add), pkgs)
pkgs = deepcopy(pkgs) # deepcopy for avoid mutating PackageSpec members
Expand Down Expand Up @@ -935,7 +935,7 @@ end
instantiate(; kwargs...) = instantiate(Context(); kwargs...)
function instantiate(ctx::Context; manifest::Union{Bool, Nothing}=nothing,
update_registry::Bool=true, verbose::Bool=false,
platform::Platform=Platform(), kwargs...)
platform::AbstractPlatform=HostPlatform(), kwargs...)
Context!(ctx; kwargs...)
if !isfile(ctx.env.project_file) && isfile(ctx.env.manifest_file)
_manifest = Pkg.Types.read_manifest(ctx.env.manifest_file)
Expand Down
14 changes: 7 additions & 7 deletions src/Artifacts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ end

"""
ensure_artifact_installed(name::String, artifacts_toml::String;
platform::Platform = Platform(),
platform::AbstractPlatform = HostPlatform(),
pkg_uuid::Union{Base.UUID,Nothing}=nothing)
Ensures an artifact is installed, downloading it via the download information stored in
Expand All @@ -372,7 +372,7 @@ Ensures an artifact is installed, downloading it via the download information st
This function requires at least Julia 1.3.
"""
function ensure_artifact_installed(name::String, artifacts_toml::String;
platform::Platform = Platform(),
platform::AbstractPlatform = HostPlatform(),
pkg_uuid::Union{Base.UUID,Nothing}=nothing,
verbose::Bool = false,
quiet_download::Bool = false)
Expand All @@ -386,7 +386,7 @@ function ensure_artifact_installed(name::String, artifacts_toml::String;
end

function ensure_artifact_installed(name::String, meta::Dict, artifacts_toml::String;
platform::Platform = Platform(),
platform::AbstractPlatform = HostPlatform(),
verbose::Bool = false,
quiet_download::Bool = false)
hash = SHA1(meta["git-tree-sha1"])
Expand Down Expand Up @@ -442,7 +442,7 @@ end

"""
ensure_all_artifacts_installed(artifacts_toml::String;
platform = Platform(),
platform = HostPlatform(),
pkg_uuid = nothing,
include_lazy = false,
verbose = false,
Expand All @@ -457,7 +457,7 @@ If `include_lazy` is set to `true`, then lazy packages will be installed as well
This function requires at least Julia 1.3.
"""
function ensure_all_artifacts_installed(artifacts_toml::String;
platform::Platform = Platform(),
platform::AbstractPlatform = HostPlatform(),
pkg_uuid::Union{Nothing,Base.UUID} = nothing,
include_lazy::Bool = false,
verbose::Bool = false,
Expand Down Expand Up @@ -487,7 +487,7 @@ end

"""
extract_all_hashes(artifacts_toml::String;
platform = Platform(),
platform = HostPlatform(),
pkg_uuid = nothing,
include_lazy = false)
Expand All @@ -497,7 +497,7 @@ be provided to properly support overrides from `Overrides.toml` entries in depot
If `include_lazy` is set to `true`, then lazy packages will be installed as well.
"""
function extract_all_hashes(artifacts_toml::String;
platform::Platform = Platform(),
platform::AbstractPlatform = HostPlatform(),
pkg_uuid::Union{Nothing,Base.UUID} = nothing,
include_lazy::Bool = false)
hashes = Base.SHA1[]
Expand Down
Loading

0 comments on commit a1eb91e

Please sign in to comment.