Skip to content

Commit

Permalink
Excise BinaryPlatforms and Artifacts
Browse files Browse the repository at this point in the history
This splits `BinaryPlatforms` and `Artifacts` out of `Pkg` and into
`Base`/a separate stdlib.  In the process, we significantly reworked
`BinaryPlatforms`, and so to maintain backwards-compatibility, we
define a set of compatability functions.
  • Loading branch information
staticfloat committed Sep 10, 2020
1 parent 1e6db49 commit 0956a93
Show file tree
Hide file tree
Showing 13 changed files with 197 additions and 1,560 deletions.
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ desc = "The next-generation Julia package manager."
version = "1.5.0"

[deps]
Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
Expand Down
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if "pdf" in ARGS
end

# setup for doctesting
DocMeta.setdocmeta!(Pkg.BinaryPlatforms, :DocTestSetup, :(using Pkg.BinaryPlatforms); recursive=true)
DocMeta.setdocmeta!(Pkg.BinaryPlatforms, :DocTestSetup, :(using Base.BinaryPlatforms); recursive=true)

# Run doctests first and disable them in makedocs
Documenter.doctest(joinpath(@__DIR__, "src"), [Pkg])
Expand Down
8 changes: 4 additions & 4 deletions src/API.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import ..depots, ..depots1, ..logdir, ..devdir
import ..Operations, ..GitTools, ..Pkg, ..UPDATED_REGISTRY_THIS_SESSION
using ..Types, ..TOML
using ..Types: VersionTypes
using ..BinaryPlatforms
using Base.BinaryPlatforms
using ..Artifacts: artifact_paths

include("generate.jl")
Expand Down 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_key_abi(), 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_key_abi(), 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_key_abi(), 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
Loading

0 comments on commit 0956a93

Please sign in to comment.