Skip to content

Commit 7cd8768

Browse files
ufechner7PatrickHaeckerDilumAluthgetopolarity
authored
Fix embedding_wrapper.c for Julia 1.11; also, run CI on 1.11, but skip the incremental=false tests on 1.11 (#954)
* Fix `embedding_wrapper.c` for Julia 1.11 Co-authored-by: Uwe Fechner <[email protected]> Co-authored-by: PatrickHaecker <[email protected]> * Start running CI on Julia 1.11 * Apply suggestions from code review Co-authored-by: Cody Tapscott <[email protected]> * Try CI on nightly, and see if the bug (from 1.11) is still present on nightly * For now, skip the `incremental=false` tests on Julia 1.11 * Fix a mistake * Update runtests.jl * Update runtests.jl * Update runtests.jl --------- Co-authored-by: PatrickHaecker <[email protected]> Co-authored-by: Dilum Aluthge <[email protected]> Co-authored-by: Cody Tapscott <[email protected]>
1 parent 0e04008 commit 7cd8768

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-4
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
- '1.6' # previous LTS
5050
# - '1.9' # TODO: uncomment this line once we fix the tests on 1.9
5151
- '1.10' # current LTS
52-
# - '1.11' # TODO: uncomment this line once we fix the tests on 1.11
52+
- '1.11'
5353
# - 'nightly' # TODO: decide whether we want to run any CI jobs on nightly.
5454
julia-wordsize:
5555
# The value here only affects the version of Julia binary that we download.

src/embedding_wrapper.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,10 @@ int main(int argc, char *argv[]) {
105105
jl_value_t *firstarg = checked_eval_string("popfirst!(ARGS)");
106106
JL_GC_PUSH1(&firstarg);
107107
jl_sym_t *var = jl_symbol("PROGRAM_FILE");
108-
#if JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR >= 10
108+
#if JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR >= 11
109+
jl_binding_t *bp = jl_get_binding_wr(jl_base_module, var, /* alloc */ 1);
110+
jl_checked_assignment(bp, jl_base_module, var, firstarg);
111+
#elif JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR >= 10
109112
jl_binding_t *bp = jl_get_binding_wr(jl_base_module, var);
110113
jl_checked_assignment(bp, jl_base_module, var, firstarg);
111114
#elif JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR >= 9

test/runtests.jl

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,22 @@ Base.init_depot_path()
1616
const is_ci = tryparse(Bool, get(ENV, "CI", "")) === true
1717
const is_slow_ci = is_ci && Sys.ARCH == :aarch64
1818
const is_julia_1_6 = VERSION.major == 1 && VERSION.minor == 6
19+
const is_julia_1_11 = VERSION.major == 1 && VERSION.minor == 11
20+
21+
if is_ci
22+
@show Sys.ARCH
23+
end
24+
25+
if is_slow_ci
26+
@warn "This is \"slow CI\" (`is_ci && Sys.ARCH == :aarch64`). Some tests will be skipped or modified." Sys.ARCH
27+
end
1928

2029
if is_julia_1_6
2130
@warn "This is Julia 1.6. Some tests will be skipped or modified." VERSION
2231
end
2332

24-
if is_ci
25-
@show Sys.ARCH
33+
if is_julia_1_11
34+
@warn "This is Julia 1.11. Some tests will be skipped or modified." VERSION
2635
end
2736

2837
function remove_llvmextras(project_file)
@@ -73,6 +82,13 @@ end
7382
app_compiled_dir = joinpath(tmp, "MyAppCompiled")
7483
@testset for incremental in (is_slow_ci ? (false,) : (true, false))
7584
if incremental == false
85+
if is_julia_1_11
86+
# On Julia 1.11, `incremental=false` is currently broken: https://github.com/JuliaLang/PackageCompiler.jl/issues/976
87+
# So, for now, we skip the `incremental=false` tests on Julia 1.11
88+
@warn "This is Julia 1.11; skipping incremental=false test due to known bug: https://github.com/JuliaLang/PackageCompiler.jl/issues/976"
89+
@test_broken false
90+
continue
91+
end
7692
filter_stdlibs = (is_slow_ci ? (true, ) : (true, false))
7793
else
7894
filter_stdlibs = (false,)

0 commit comments

Comments
 (0)