Skip to content

Commit

Permalink
handle change in Base.active_repl_backend on 1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth authored and Keno committed Jul 26, 2024
1 parent 8d9a05e commit e8820e4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
TERM="xterm" julia --project --code-coverage=user -e '
using InteractiveUtils, REPL, Revise
@async(Base.run_main_repl(true, true, false, true, false))
while !isdefined(Base, :active_repl_backend) sleep(0.1) end
while (!isdefined(Base, :active_repl_backend) || isnothing(Base.active_repl_backend)) sleep(0.1) end
pushfirst!(Base.active_repl_backend.ast_transforms, Revise.revise_first)
include(joinpath("test", "runtests.jl"))
if Base.VERSION.major == 1 && Base.VERSION.minor >= 9
Expand Down
1 change: 1 addition & 0 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ task, so a `yield` will need to occur before it happens.
"""
function throwto_repl(e::Exception)
if isdefined(Base, :active_repl_backend) &&
!isnothing(Base.active_repl_backend) &&
Base.active_repl_backend.backend_task.state === :runnable &&
isempty(Base.Workqueue) &&
Base.active_repl_backend.in_eval
Expand Down
2 changes: 1 addition & 1 deletion test/start_late.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Test

@async(Base.run_main_repl(true, true, false, true, false))
while !isdefined(Base, :active_repl_backend)
while !isdefined(Base, :active_repl_backend) || isnothing(Base.active_repl_backend)
sleep(0.5)
end

Expand Down

0 comments on commit e8820e4

Please sign in to comment.