From 9ce1d60fa0a20c669de5fcbbabbabfa35982a348 Mon Sep 17 00:00:00 2001 From: Uwe Fechner Date: Tue, 30 Jul 2024 07:25:06 +0200 Subject: [PATCH 1/9] Fix `embedding_wrapper.c` for Julia 1.11 Co-authored-by: Uwe Fechner Co-authored-by: PatrickHaecker <152268010+PatrickHaecker@users.noreply.github.com> --- src/embedding_wrapper.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/embedding_wrapper.c b/src/embedding_wrapper.c index 25084802..73aaf148 100644 --- a/src/embedding_wrapper.c +++ b/src/embedding_wrapper.c @@ -105,7 +105,10 @@ int main(int argc, char *argv[]) { jl_value_t *firstarg = checked_eval_string("popfirst!(ARGS)"); JL_GC_PUSH1(&firstarg); jl_sym_t *var = jl_symbol("PROGRAM_FILE"); -#if JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR >= 10 +#if JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR >= 11 + jl_binding_t *bp = jl_get_binding_wr(jl_base_module, var, 1); + jl_checked_assignment(bp, jl_base_module, var, firstarg); +#elif JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR >= 10 jl_binding_t *bp = jl_get_binding_wr(jl_base_module, var); jl_checked_assignment(bp, jl_base_module, var, firstarg); #elif JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR >= 9 From 793f66a58dbad4eec9d0c1c122cb02f9c205d470 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Tue, 15 Oct 2024 21:29:55 -0400 Subject: [PATCH 2/9] Start running CI on Julia 1.11 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9edae785..9cd92989 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,7 @@ jobs: - '1.6' # previous LTS # - '1.9' # TODO: uncomment this line once we fix the tests on 1.9 - '1.10' # current LTS - # - '1.11' # TODO: uncomment this line once we fix the tests on 1.11 + - '1.11' # - 'nightly' # TODO: decide whether we want to run any CI jobs on nightly. julia-arch: - 'x64' # 32-bit Julia From e84b6b0c603c06ff2f61810eb85c93fa0bf4e2a9 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Tue, 15 Oct 2024 22:01:39 -0400 Subject: [PATCH 3/9] Apply suggestions from code review Co-authored-by: Cody Tapscott <84105208+topolarity@users.noreply.github.com> --- src/embedding_wrapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/embedding_wrapper.c b/src/embedding_wrapper.c index 73aaf148..18526873 100644 --- a/src/embedding_wrapper.c +++ b/src/embedding_wrapper.c @@ -106,7 +106,7 @@ int main(int argc, char *argv[]) { JL_GC_PUSH1(&firstarg); jl_sym_t *var = jl_symbol("PROGRAM_FILE"); #if JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR >= 11 - jl_binding_t *bp = jl_get_binding_wr(jl_base_module, var, 1); + jl_binding_t *bp = jl_get_binding_wr(jl_base_module, var, /* alloc */ 1); jl_checked_assignment(bp, jl_base_module, var, firstarg); #elif JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR >= 10 jl_binding_t *bp = jl_get_binding_wr(jl_base_module, var); From 6ca17a6a9f50099e7d16cfe8ba01ee8843e280a9 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Wed, 16 Oct 2024 06:11:46 -0400 Subject: [PATCH 4/9] Try CI on nightly, and see if the bug (from 1.11) is still present on nightly --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9cd92989..c8f8ddbd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: # - '1.9' # TODO: uncomment this line once we fix the tests on 1.9 - '1.10' # current LTS - '1.11' - # - 'nightly' # TODO: decide whether we want to run any CI jobs on nightly. + - 'nightly' # TODO: decide whether we want to run any CI jobs on nightly. julia-arch: - 'x64' # 32-bit Julia - 'x86' # 64-bit Julia From eb431870cf3b38e39a59afa400c3e659bb13122a Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Thu, 17 Oct 2024 13:59:53 -0400 Subject: [PATCH 5/9] For now, skip the `incremental=false` tests on Julia 1.11 --- test/runtests.jl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/runtests.jl b/test/runtests.jl index 00572238..29c9c156 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -16,11 +16,16 @@ Base.init_depot_path() const is_ci = tryparse(Bool, get(ENV, "CI", "")) === true const is_slow_ci = is_ci && Sys.ARCH == :aarch64 const is_julia_1_6 = VERSION.major == 1 && VERSION.minor == 6 +const is_julia_1_6 = VERSION.major == 1 && VERSION.minor == 11 if is_julia_1_6 @warn "This is Julia 1.6. Some tests will be skipped or modified." VERSION end +if is_julia_1_11 + @warn "This is Julia 1.11. Some tests will be skipped or modified." VERSION +end + if is_ci @show Sys.ARCH end @@ -73,6 +78,13 @@ end app_compiled_dir = joinpath(tmp, "MyAppCompiled") @testset for incremental in (is_slow_ci ? (false,) : (true, false)) if incremental == false + if is_julia_1_11 + # On Julia 1.11, `incremental=false` is currently broken: https://github.com/JuliaLang/PackageCompiler.jl/issues/976 + # So, for now, we skip the `incremental=false` tests on Julia 1.11 + @warn "This is Julia 1.11; skipping incremental=false test due to known bug: https://github.com/JuliaLang/PackageCompiler.jl/issues/976` + @test_broken false + continue + end filter_stdlibs = (is_slow_ci ? (true, ) : (true, false)) else filter_stdlibs = (false,) From 4e676cfc44d3150431f8aa6f3f9d057606f809f1 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Thu, 17 Oct 2024 14:03:26 -0400 Subject: [PATCH 6/9] Fix a mistake --- test/runtests.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index 29c9c156..4fa9e825 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -16,7 +16,7 @@ Base.init_depot_path() const is_ci = tryparse(Bool, get(ENV, "CI", "")) === true const is_slow_ci = is_ci && Sys.ARCH == :aarch64 const is_julia_1_6 = VERSION.major == 1 && VERSION.minor == 6 -const is_julia_1_6 = VERSION.major == 1 && VERSION.minor == 11 +const is_julia_1_11 = VERSION.major == 1 && VERSION.minor == 11 if is_julia_1_6 @warn "This is Julia 1.6. Some tests will be skipped or modified." VERSION From 84589b157d04ea001624b9f5dec494e02e6bede6 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Thu, 17 Oct 2024 14:04:40 -0400 Subject: [PATCH 7/9] Update runtests.jl --- test/runtests.jl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 4fa9e825..da75581d 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -18,6 +18,14 @@ const is_slow_ci = is_ci && Sys.ARCH == :aarch64 const is_julia_1_6 = VERSION.major == 1 && VERSION.minor == 6 const is_julia_1_11 = VERSION.major == 1 && VERSION.minor == 11 +if is_ci + @show Sys.ARCH +end + +if is_slow_ci + @warn "This is "slow CI" (`is_ci && Sys.ARCH == :aarch64`). Some tests will be skipped or modified." Sys.ARCH +end + if is_julia_1_6 @warn "This is Julia 1.6. Some tests will be skipped or modified." VERSION end @@ -26,10 +34,6 @@ if is_julia_1_11 @warn "This is Julia 1.11. Some tests will be skipped or modified." VERSION end -if is_ci - @show Sys.ARCH -end - function remove_llvmextras(project_file) proj = TOML.parsefile(project_file) delete!(proj["deps"], "LLVMExtra_jll") From d94a0f7d253d9203a0e591ccec1dad3d8e4fcf2c Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Thu, 17 Oct 2024 14:15:50 -0400 Subject: [PATCH 8/9] Update runtests.jl --- test/runtests.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index da75581d..5f303766 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -23,7 +23,7 @@ if is_ci end if is_slow_ci - @warn "This is "slow CI" (`is_ci && Sys.ARCH == :aarch64`). Some tests will be skipped or modified." Sys.ARCH + @warn "This is \"slow CI\" (`is_ci && Sys.ARCH == :aarch64`). Some tests will be skipped or modified." Sys.ARCH end if is_julia_1_6 From 7f15dda6dc0e1913fbf566d6d895d24053a4c983 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Thu, 17 Oct 2024 14:17:44 -0400 Subject: [PATCH 9/9] Update runtests.jl --- test/runtests.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index 5f303766..d6d532b1 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -85,7 +85,7 @@ end if is_julia_1_11 # On Julia 1.11, `incremental=false` is currently broken: https://github.com/JuliaLang/PackageCompiler.jl/issues/976 # So, for now, we skip the `incremental=false` tests on Julia 1.11 - @warn "This is Julia 1.11; skipping incremental=false test due to known bug: https://github.com/JuliaLang/PackageCompiler.jl/issues/976` + @warn "This is Julia 1.11; skipping incremental=false test due to known bug: https://github.com/JuliaLang/PackageCompiler.jl/issues/976" @test_broken false continue end