-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Labels
REPLJulia's REPL (Read Eval Print Loop)Julia's REPL (Read Eval Print Loop)bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcompletionsTab and autocompletion in the replTab and autocompletion in the repl
Milestone
Description
Sometimes tab completion freezes the REPL. For example, I type
julia> complicated_hard_to_infer_function(f(x) * y, g(x), TAB
and this gives me a frozen REPL for a few minutes, where not even Ctrl-C does something useful. Not a great user experience (in particular the Ctrl-C not responding part).
@MasonProtter provided the following reproducer (my original example is free of @generated):
julia> @generated function foo()
@info "Compiling foo()"
sleep(10)
(;a=1, b=2)
end;
julia> foo().[ Info: Compiling foo()
This is with julia 1.10.
Can we make the under the hood type inference give up if the result cannot be returned "immediately"? Alternatively, can we make Ctrl-C work?
Edit: It is really bad on 1.11, where this is triggered by the tab completion "hint", so almost always.
Edit edit: For the fellow victims of this: One can turn it off (on 1.11) by typing the following in the REPL
Base.active_repl.options.hint_tab_completes = false
or putting
atreplinit() do repl
if VERSION >= v"1.11.0-0"
repl.options.hint_tab_completes = false
end
end
in your startup.jl.
oscardssmith, avik-pal, exaexa, Moelf, stelmo and 4 more
Metadata
Metadata
Assignees
Labels
REPLJulia's REPL (Read Eval Print Loop)Julia's REPL (Read Eval Print Loop)bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcompletionsTab and autocompletion in the replTab and autocompletion in the repl