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

Support Julia 1.11+ #113

Merged
merged 14 commits into from
May 22, 2024
33 changes: 16 additions & 17 deletions src/runner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -380,27 +380,26 @@ function test!(pkg::AbstractString,
cmd = gen_command(runner_code, julia_args, coverage)
test_folder_has_project_file = has_test_project_file(testfilepath)

if VERSION >= v"1.4.0" || (VERSION >= v"1.2.0" && test_folder_has_project_file)
if VERSION >= v"1.4" || (VERSION >= v"1.2" && test_folder_has_project_file)
# Operations.sandbox() has different arguments between versions
sandbox_args = (ctx,
pkgspec,
pkgspec.path,
joinpath(pkgspec.path, "test"))
if VERSION >= v"1.8.0"
test_project_override = test_folder_has_project_file ?
nothing :
test_project_override = if VERSION >= v"1.4" && !test_folder_has_project_file
if VERSION >= v"1.8"
gen_target_project(ctx, pkgspec, pkgspec.path::String, "test")
sandbox_args = (sandbox_args..., test_project_override)
elseif VERSION >= v"1.7.0"
test_project_override = test_folder_has_project_file ?
nothing :
elseif VERSION >= v"1.7"
gen_target_project(ctx.env, ctx.registries, pkgspec, pkgspec.path, "test")
sandbox_args = (sandbox_args..., test_project_override)
elseif VERSION >= v"1.4.0"
test_project_override = test_folder_has_project_file ?
nothing :
else
gen_target_project(ctx, pkgspec, pkgspec.path, "test")
sandbox_args = (sandbox_args..., test_project_override)
end
else
nothing
end
Comment on lines -398 to +408
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diff is hard to read but this part is just dealing with version differences for calling gen_target_project independently from sandbox args


sandbox_args = if VERSION >= v"1.11.0-"
(ctx, pkgspec, joinpath(pkgspec.path, "test"), test_project_override)
elseif VERSION >= v"1.4.0"
(ctx, pkgspec, pkgspec.path, joinpath(pkgspec.path, "test"), test_project_override)
else
(ctx, pkgspec, pkgspec.path, joinpath(pkgspec.path, "test"))
end

sandbox(sandbox_args...) do
Expand Down
4 changes: 3 additions & 1 deletion test/reportgeneration.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ const TEST_PKG = (name = "Example", uuid = UUID("7876af07-990d-54b4-ab0e-2369062
end

@testset "Complex Example" begin
test_file = if VERSION >= v"1.9.0-beta4.29" # https://github.com/JuliaLang/julia/pull/48526
test_file = if VERSION >= v"1.11-"
"references/complexexample.txt"
elseif VERSION >= v"1.9.0-beta4.29" # https://github.com/JuliaLang/julia/pull/48526
"references/complexexample_pre_1_11.txt"
elseif VERSION >= v"1.7.0"
"references/complexexample_pre_1_9.txt"
else
Expand Down
Loading