Skip to content

Commit 4658f93

Browse files
Fix print_response hanging on 1.11.5+ (#367)
Co-authored-by: Kristoffer Carlsson <[email protected]>
1 parent 6a6beab commit 4658f93

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
with:
3030
version: ${{ matrix.version }}
3131
arch: ${{ matrix.arch }}
32-
- uses: actions/cache@v1
32+
- uses: actions/cache@v4
3333
env:
3434
cache-name: cache-artifacts
3535
with:

src/repl.jl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,15 @@ function julia_prompt(state::DebuggerState)
189189
return false
190190
end
191191
command = String(take!(buf))
192-
@static if VERSION >= v"1.2.0-DEV.253"
193-
response = _eval_code(active_frame(state), command)
192+
response = _eval_code(active_frame(state), command)
193+
@static if VERSION >= v"1.11.5"
194+
# Since https://github.com/JuliaLang/julia/pull/57773 REPL.print_resons runs `display` on the backend
195+
# task. If this is called from the same thread the channel orchestration will block, so do this async.
196+
fetch(Threads.@spawn REPL.print_response(state.repl, response, true, true))
197+
elseif VERSION >= v"1.2.0-DEV.253"
194198
REPL.print_response(state.repl, response, true, true)
195199
else
196-
ok, result = _eval_code(active_frame(state), command)
200+
ok, result = response
197201
REPL.print_response(state.repl, ok ? result : result[1], ok ? nothing : result[2], true, true)
198202
end
199203
println(state.terminal)

0 commit comments

Comments
 (0)