Skip to content

Commit 6777978

Browse files
authored
Bump julia [compat] to 1.10 (and drop support for 1.6 through 1.9) (#1005)
1 parent 530b392 commit 6777978

File tree

6 files changed

+17
-93
lines changed

6 files changed

+17
-93
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ jobs:
4949
fail-fast: false
5050
matrix:
5151
julia-version:
52-
- '1.6' # previous LTS
5352
- '1.10' # current LTS
5453
- '1.11' # current stable
5554
#
@@ -74,14 +73,6 @@ jobs:
7473
coverage:
7574
- 'true'
7675
exclude:
77-
# Julia 1.6 did not support Apple Silicon:
78-
- github-runner: macos-14 # macos-14 = Apple Silicon.
79-
julia-version: '1.6'
80-
#
81-
# To save some CI time, on Julia 1.6 we only run the 64-bit job (and skip the 32-bit job).
82-
- julia-version: '1.6'
83-
julia-wordsize: '32'
84-
#
8576
# We don't have 32-bit builds of Julia for Intel macOS:
8677
- github-runner: macos-13 # macos-13 = Intel.
8778
julia-wordsize: '32'

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Printf = "1"
2424
RelocatableFolders = "0.1, 0.3, 1"
2525
TOML = "<0.0.1, 1"
2626
UUIDs = "<0.0.1, 1"
27-
julia = "1.6"
27+
julia = "1.10"
2828

2929
[extras]
3030
Example = "7876af07-990d-54b4-ab0e-23690620f79a"

examples/MyApp/src/MyApp.jl

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,7 @@ using HelloWorldC_jll
55
using Artifacts
66
using Distributed
77
using Random
8-
9-
# We seem to get problems with LLVMExtra_jll on Julia 1.6 and 1.9
10-
# Issue for 1.6: https://github.com/JuliaLang/PackageCompiler.jl/issues/706
11-
# There's no GitHub Issue for 1.9
12-
@static if (VERSION.major, VERSION.minor) ((1, 6), (1, 9),)
13-
using LLVMExtra_jll
14-
end
8+
using LLVMExtra_jll
159

1610
using micromamba_jll
1711

@@ -66,7 +60,7 @@ function real_main()
6660

6761
println("Running the artifact")
6862
res = readchomp(`$(hello_world_path())`)
69-
println("Artifact printed: $res")
63+
println("Artifact printed: $res")
7064

7165
@show unsafe_string(Base.JLOptions().image_file)
7266
@show Example.domath(5)
@@ -89,12 +83,10 @@ function real_main()
8983
@eval @everywhere using Example
9084
@everywhere println(Example.domath(3))
9185

92-
@static if (VERSION.major, VERSION.minor) ((1, 6), (1, 9),)
93-
if isfile(LLVMExtra_jll.libLLVMExtra_path)
94-
println("LLVMExtra path: ok!")
95-
else
96-
println("LLVMExtra path: fail!")
97-
end
86+
if isfile(LLVMExtra_jll.libLLVMExtra_path)
87+
println("LLVMExtra path: ok!")
88+
else
89+
println("LLVMExtra path: fail!")
9890
end
9991

10092
if isfile(micromamba_jll.micromamba_path)

src/PackageCompiler.jl

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ include("library_selection.jl")
2424
##############
2525

2626
const NATIVE_CPU_TARGET = "native"
27-
const TLS_SYNTAX = VERSION >= v"1.7.0-DEV.1205" ? `-DNEW_DEFINE_FAST_TLS_SYNTAX` : ``
27+
const TLS_SYNTAX = `-DNEW_DEFINE_FAST_TLS_SYNTAX`
2828

2929
const DEFAULT_EMBEDDING_WRAPPER = @path joinpath(@__DIR__, "embedding_wrapper.c")
3030
const DEFAULT_JULIA_INIT = @path joinpath(@__DIR__, "julia_init.c")
@@ -78,22 +78,18 @@ function create_pkg_context(project)
7878
end
7979

8080
function load_all_deps(ctx)
81-
ctx_or_env = VERSION <= v"1.7.0-" ? ctx : ctx.env
81+
env = ctx.env
8282
if isdefined(Pkg.Operations, :load_all_deps!)
8383
pkgs = Pkg.Types.PackageSpec[]
84-
Pkg.Operations.load_all_deps!(ctx_or_env, pkgs)
84+
Pkg.Operations.load_all_deps!(env, pkgs)
8585
else
86-
pkgs = Pkg.Operations.load_all_deps(ctx_or_env)
86+
pkgs = Pkg.Operations.load_all_deps(env)
8787
end
8888
return pkgs
8989
end
9090

9191
function source_path(ctx, pkg)
92-
if VERSION <= v"1.7.0-"
93-
Pkg.Operations.source_path(ctx, pkg)
94-
else
95-
Pkg.Operations.source_path(ctx.env.project_file, pkg)
96-
end
92+
Pkg.Operations.source_path(ctx.env.project_file, pkg)
9793
end
9894

9995
const _STDLIBS = readdir(Sys.STDLIB)
@@ -379,28 +375,11 @@ function create_sysimg_object_file(object_file::String,
379375
isexpr(ps, :call) || continue
380376
popfirst!(ps.args) # precompile(...)
381377
ps.head = :tuple
382-
@static if VERSION <= v"1.9.0"
383-
l = ps.args[end]
384-
if (isexpr(l, :tuple) || isexpr(l, :curly)) && length(l.args) > 0 # Tuple{...} or (...)
385-
# XXX: precompile doesn't currently handle overloaded Vararg arguments very well.
386-
# Replacing N with a large number works around it.
387-
l = l.args[end]
388-
if isexpr(l, :curly) && length(l.args) == 2 && l.args[1] === :Vararg # Vararg{T}
389-
push!(l.args, 100) # form Vararg{T, 100} instead
390-
end
391-
end
392-
end
393378
# println(ps)
394379
local ps
395380
while true
396381
try
397382
ps = Core.eval(PrecompileStagingArea, ps)
398-
@static if VERSION <= v"1.9.0-beta1"
399-
# XXX: precompile doesn't currently handle overloaded nospecialize arguments very well.
400-
# Skipping them avoids the warning.
401-
ms = length(ps) == 1 ? Base._methods_by_ftype(ps[1], 1, Base.get_world_counter()) : Base.methods(ps...)
402-
ms isa Vector || @goto skip_precompile
403-
end
404383
break
405384
catch e
406385
if e isa UndefVarError

src/library_selection.jl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,4 @@ const required_libraries = Dict(
1818
"mac" => ["libLLVM", "libatomic", "libdSFMT", "libgcc_s", "libgfortran", "libgmp", "libgmpxx", "libgomp", "libjulia-codegen", "libjulia-internal", "libmpfr", "libopenlibm", "libpcre2-8", "libquadmath", "libssp", "libstdc++", "libuv", "libz"]
1919
)
2020
push!(required_libraries["windows"], "libgcc_s_jlj")
21-
if Sys.VERSION < v"1.7.0"
22-
push!(required_libraries["mac"], "libosxunwind")
23-
else
24-
push!(required_libraries["mac"], "libunwind")
25-
end
21+
push!(required_libraries["mac"], "libunwind")

test/runtests.jl

Lines changed: 4 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ Base.init_depot_path()
1919
# If I recall correctly, Julia's PkgEval.jl also sets it.
2020
const is_ci = tryparse(Bool, get(ENV, "CI", "")) === true
2121

22-
# GHA = GitHub Actions
23-
const is_gha_ci = tryparse(Bool, get(ENV, "GITHUB_ACTIONS", "")) === true
24-
2522
# In order to be "slow CI", we must meet all of the following:
2623
# 1. We are running on CI.
2724
# 2. We are running on aarch64 (arm64).
@@ -30,34 +27,14 @@ const is_gha_ci = tryparse(Bool, get(ENV, "GITHUB_ACTIONS", "")) === true
3027
# macOS runners seem to be quite fast.)
3128
const is_slow_ci = is_ci && Sys.ARCH == :aarch64 && !Sys.isapple()
3229

33-
const is_julia_1_6 = VERSION.major == 1 && VERSION.minor == 6
34-
const is_julia_1_9 = VERSION.major == 1 && VERSION.minor == 9
35-
36-
if is_ci || is_gha_ci
37-
@info "This is a CI job" Sys.ARCH VERSION is_ci is_gha_ci
30+
if is_ci
31+
@info "This is a CI job" Sys.ARCH VERSION is_ci
3832
end
3933

4034
if is_slow_ci
4135
@warn "This is \"slow CI\" (defined as any non-macOS CI running on aarch64). Some tests will be skipped or modified." Sys.ARCH
4236
end
4337

44-
const jlver_some_tests_skipped = [
45-
is_julia_1_6,
46-
is_julia_1_9,
47-
]
48-
49-
if any(jlver_some_tests_skipped)
50-
@warn "This is Julia $(VERSION.major).$(VERSION.minor). Some tests will be skipped or modified." VERSION
51-
end
52-
53-
function remove_llvmextras(project_file)
54-
proj = TOML.parsefile(project_file)
55-
delete!(proj["deps"], "LLVMExtra_jll")
56-
open(project_file, "w") do io
57-
TOML.print(io, proj)
58-
end
59-
end
60-
6138
@testset "PackageCompiler.jl" begin
6239
@testset "create_sysimage" begin
6340
new_project = mktempdir()
@@ -117,12 +94,6 @@ end
11794
@info "starting: create_app testset" incremental filter
11895
tmp_app_source_dir = joinpath(tmp, "MyApp")
11996
cp(app_source_dir, tmp_app_source_dir)
120-
if is_gha_ci && (is_julia_1_6 || is_julia_1_9)
121-
# Julia 1.6: Issue #706 "Cannot locate artifact 'LLVMExtra'" on 1.6 so remove.
122-
# Julia 1.9: There's no GitHub Issue, but it seems we hit a similar problem.
123-
@test_skip false
124-
remove_llvmextras(joinpath(tmp_app_source_dir, "Project.toml"))
125-
end
12697
try
12798
create_app(tmp_app_source_dir, app_compiled_dir; incremental=incremental, force=true, filter_stdlibs=filter, include_lazy_artifacts=true,
12899
precompile_execution_file=joinpath(app_source_dir, "precompile_app.jl"),
@@ -176,13 +147,8 @@ end
176147
@test occursin("From worker 4:\t8", app_output)
177148
@test occursin("From worker 5:\t8", app_output)
178149

179-
if is_julia_1_6 || is_julia_1_9
180-
# Julia 1.6: Issue #706 "Cannot locate artifact 'LLVMExtra'" on 1.6 so remove.
181-
# Julia 1.9: There's no GitHub Issue, but it seems we hit a similar problem.
182-
@test_skip false
183-
else
184-
@test occursin("LLVMExtra path: ok!", app_output)
185-
end
150+
151+
@test occursin("LLVMExtra path: ok!", app_output)
186152
@test occursin("micromamba_jll path: ok!", app_output)
187153

188154
# Test second app

0 commit comments

Comments
 (0)