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

[Dependencies] Do not pass the content to Pkg.add in recent Julia #415

Closed
wants to merge 3 commits into from
Closed
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
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -66,6 +66,10 @@ jobs:
squashfs: true
julia-version: "1.11"

- runner: privileged
squashfs: true
julia-version: "nightly"

# - runner: privileged
# squashfs: true
# julia-version: "nightly"
11 changes: 10 additions & 1 deletion src/Prefix.jl
Original file line number Diff line number Diff line change
@@ -602,7 +602,7 @@ function get_addable_spec(name::AbstractString, version::VersionNumber;
end

# Helper function to install packages also in Julia v1.8
function Pkg_add(args...; kwargs...)
function _Pkg_add(args...; kwargs...)
@static if VERSION < v"1.8.0"
Pkg.add(args...; kwargs...)
else
@@ -615,6 +615,15 @@ function Pkg_add(args...; kwargs...)
end
end

function Pkg_add(ctx::Pkg.Types.Context, rest...; kwargs...)
@static if VERSION >= v"1.13-"
# No need to pass the context anymore.
_Pkg_add(rest...; julia_version = ctx.julia_version, kwargs...)
else
_Pkg_add(ctx, rest...; kwargs...)
end
end

"""
setup_dependencies(prefix::Prefix, dependencies::Vector{PackageSpec}, platform::AbstractPlatform; verbose::Bool = false)
2 changes: 1 addition & 1 deletion test/dependencies.jl
Original file line number Diff line number Diff line change
@@ -373,7 +373,7 @@ end
with_temp_project() do dir
prefix = Prefix(dir)
dependencies = [
PackageSpec(; name="CMake_jll", version = v"3.24.3")
PackageSpec(; name="CMake_jll", version = "3.24.3")
]
platform = Platform("x86_64", "linux"; libc="musl", cxxstring_abi="cxx11")
if v"1.9" <= VERSION < v"1.11"