diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 721de8e1..47903649 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,6 @@ jobs: fail-fast: false matrix: julia-version: - - '1.6' # previous LTS - '1.10' # current LTS - '1.11' # current stable # @@ -74,14 +73,6 @@ jobs: coverage: - 'true' exclude: - # Julia 1.6 did not support Apple Silicon: - - github-runner: macos-14 # macos-14 = Apple Silicon. - julia-version: '1.6' - # - # To save some CI time, on Julia 1.6 we only run the 64-bit job (and skip the 32-bit job). - - julia-version: '1.6' - julia-wordsize: '32' - # # We don't have 32-bit builds of Julia for Intel macOS: - github-runner: macos-13 # macos-13 = Intel. julia-wordsize: '32' diff --git a/Project.toml b/Project.toml index afd77603..ad1f58f8 100644 --- a/Project.toml +++ b/Project.toml @@ -24,7 +24,7 @@ Printf = "1" RelocatableFolders = "0.1, 0.3, 1" TOML = "<0.0.1, 1" UUIDs = "<0.0.1, 1" -julia = "1.6" +julia = "1.10" [extras] Example = "7876af07-990d-54b4-ab0e-23690620f79a" diff --git a/examples/MyApp/src/MyApp.jl b/examples/MyApp/src/MyApp.jl index 8be7cfb4..d1b12b23 100644 --- a/examples/MyApp/src/MyApp.jl +++ b/examples/MyApp/src/MyApp.jl @@ -5,13 +5,7 @@ using HelloWorldC_jll using Artifacts using Distributed using Random - -# We seem to get problems with LLVMExtra_jll on Julia 1.6 and 1.9 -# Issue for 1.6: https://github.com/JuliaLang/PackageCompiler.jl/issues/706 -# There's no GitHub Issue for 1.9 -@static if (VERSION.major, VERSION.minor) ∉ ((1, 6), (1, 9),) - using LLVMExtra_jll -end +using LLVMExtra_jll using micromamba_jll @@ -66,7 +60,7 @@ function real_main() println("Running the artifact") res = readchomp(`$(hello_world_path())`) - println("Artifact printed: $res") + println("Artifact printed: $res") @show unsafe_string(Base.JLOptions().image_file) @show Example.domath(5) @@ -89,12 +83,10 @@ function real_main() @eval @everywhere using Example @everywhere println(Example.domath(3)) - @static if (VERSION.major, VERSION.minor) ∉ ((1, 6), (1, 9),) - if isfile(LLVMExtra_jll.libLLVMExtra_path) - println("LLVMExtra path: ok!") - else - println("LLVMExtra path: fail!") - end + if isfile(LLVMExtra_jll.libLLVMExtra_path) + println("LLVMExtra path: ok!") + else + println("LLVMExtra path: fail!") end if isfile(micromamba_jll.micromamba_path) diff --git a/src/PackageCompiler.jl b/src/PackageCompiler.jl index 220763b5..9bd8314a 100644 --- a/src/PackageCompiler.jl +++ b/src/PackageCompiler.jl @@ -24,7 +24,7 @@ include("library_selection.jl") ############## const NATIVE_CPU_TARGET = "native" -const TLS_SYNTAX = VERSION >= v"1.7.0-DEV.1205" ? `-DNEW_DEFINE_FAST_TLS_SYNTAX` : `` +const TLS_SYNTAX = `-DNEW_DEFINE_FAST_TLS_SYNTAX` const DEFAULT_EMBEDDING_WRAPPER = @path joinpath(@__DIR__, "embedding_wrapper.c") const DEFAULT_JULIA_INIT = @path joinpath(@__DIR__, "julia_init.c") @@ -78,22 +78,18 @@ function create_pkg_context(project) end function load_all_deps(ctx) - ctx_or_env = VERSION <= v"1.7.0-" ? ctx : ctx.env + env = ctx.env if isdefined(Pkg.Operations, :load_all_deps!) pkgs = Pkg.Types.PackageSpec[] - Pkg.Operations.load_all_deps!(ctx_or_env, pkgs) + Pkg.Operations.load_all_deps!(env, pkgs) else - pkgs = Pkg.Operations.load_all_deps(ctx_or_env) + pkgs = Pkg.Operations.load_all_deps(env) end return pkgs end function source_path(ctx, pkg) - if VERSION <= v"1.7.0-" - Pkg.Operations.source_path(ctx, pkg) - else - Pkg.Operations.source_path(ctx.env.project_file, pkg) - end + Pkg.Operations.source_path(ctx.env.project_file, pkg) end const _STDLIBS = readdir(Sys.STDLIB) @@ -379,28 +375,11 @@ function create_sysimg_object_file(object_file::String, isexpr(ps, :call) || continue popfirst!(ps.args) # precompile(...) ps.head = :tuple - @static if VERSION <= v"1.9.0" - l = ps.args[end] - if (isexpr(l, :tuple) || isexpr(l, :curly)) && length(l.args) > 0 # Tuple{...} or (...) - # XXX: precompile doesn't currently handle overloaded Vararg arguments very well. - # Replacing N with a large number works around it. - l = l.args[end] - if isexpr(l, :curly) && length(l.args) == 2 && l.args[1] === :Vararg # Vararg{T} - push!(l.args, 100) # form Vararg{T, 100} instead - end - end - end # println(ps) local ps while true try ps = Core.eval(PrecompileStagingArea, ps) - @static if VERSION <= v"1.9.0-beta1" - # XXX: precompile doesn't currently handle overloaded nospecialize arguments very well. - # Skipping them avoids the warning. - ms = length(ps) == 1 ? Base._methods_by_ftype(ps[1], 1, Base.get_world_counter()) : Base.methods(ps...) - ms isa Vector || @goto skip_precompile - end break catch e if e isa UndefVarError diff --git a/src/library_selection.jl b/src/library_selection.jl index 4435dcb7..54b1df3d 100644 --- a/src/library_selection.jl +++ b/src/library_selection.jl @@ -18,8 +18,4 @@ const required_libraries = Dict( "mac" => ["libLLVM", "libatomic", "libdSFMT", "libgcc_s", "libgfortran", "libgmp", "libgmpxx", "libgomp", "libjulia-codegen", "libjulia-internal", "libmpfr", "libopenlibm", "libpcre2-8", "libquadmath", "libssp", "libstdc++", "libuv", "libz"] ) push!(required_libraries["windows"], "libgcc_s_jlj") -if Sys.VERSION < v"1.7.0" - push!(required_libraries["mac"], "libosxunwind") -else - push!(required_libraries["mac"], "libunwind") -end +push!(required_libraries["mac"], "libunwind") diff --git a/test/runtests.jl b/test/runtests.jl index a02e20a0..53de518f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -19,9 +19,6 @@ Base.init_depot_path() # If I recall correctly, Julia's PkgEval.jl also sets it. const is_ci = tryparse(Bool, get(ENV, "CI", "")) === true -# GHA = GitHub Actions -const is_gha_ci = tryparse(Bool, get(ENV, "GITHUB_ACTIONS", "")) === true - # In order to be "slow CI", we must meet all of the following: # 1. We are running on CI. # 2. We are running on aarch64 (arm64). @@ -30,34 +27,14 @@ const is_gha_ci = tryparse(Bool, get(ENV, "GITHUB_ACTIONS", "")) === true # macOS runners seem to be quite fast.) const is_slow_ci = is_ci && Sys.ARCH == :aarch64 && !Sys.isapple() -const is_julia_1_6 = VERSION.major == 1 && VERSION.minor == 6 -const is_julia_1_9 = VERSION.major == 1 && VERSION.minor == 9 - -if is_ci || is_gha_ci - @info "This is a CI job" Sys.ARCH VERSION is_ci is_gha_ci +if is_ci + @info "This is a CI job" Sys.ARCH VERSION is_ci end if is_slow_ci @warn "This is \"slow CI\" (defined as any non-macOS CI running on aarch64). Some tests will be skipped or modified." Sys.ARCH end -const jlver_some_tests_skipped = [ - is_julia_1_6, - is_julia_1_9, -] - -if any(jlver_some_tests_skipped) - @warn "This is Julia $(VERSION.major).$(VERSION.minor). Some tests will be skipped or modified." VERSION -end - -function remove_llvmextras(project_file) - proj = TOML.parsefile(project_file) - delete!(proj["deps"], "LLVMExtra_jll") - open(project_file, "w") do io - TOML.print(io, proj) - end -end - @testset "PackageCompiler.jl" begin @testset "create_sysimage" begin new_project = mktempdir() @@ -117,12 +94,6 @@ end @info "starting: create_app testset" incremental filter tmp_app_source_dir = joinpath(tmp, "MyApp") cp(app_source_dir, tmp_app_source_dir) - if is_gha_ci && (is_julia_1_6 || is_julia_1_9) - # Julia 1.6: Issue #706 "Cannot locate artifact 'LLVMExtra'" on 1.6 so remove. - # Julia 1.9: There's no GitHub Issue, but it seems we hit a similar problem. - @test_skip false - remove_llvmextras(joinpath(tmp_app_source_dir, "Project.toml")) - end try create_app(tmp_app_source_dir, app_compiled_dir; incremental=incremental, force=true, filter_stdlibs=filter, include_lazy_artifacts=true, precompile_execution_file=joinpath(app_source_dir, "precompile_app.jl"), @@ -176,13 +147,8 @@ end @test occursin("From worker 4:\t8", app_output) @test occursin("From worker 5:\t8", app_output) - if is_julia_1_6 || is_julia_1_9 - # Julia 1.6: Issue #706 "Cannot locate artifact 'LLVMExtra'" on 1.6 so remove. - # Julia 1.9: There's no GitHub Issue, but it seems we hit a similar problem. - @test_skip false - else - @test occursin("LLVMExtra path: ok!", app_output) - end + + @test occursin("LLVMExtra path: ok!", app_output) @test occursin("micromamba_jll path: ok!", app_output) # Test second app