Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REPL: Handle message from complete_methods! when max methods is hit #57138

Merged

Conversation

IanButterworth
Copy link
Member

It appears #56963 wasn't a proper fix (although curiously it did appear to work #56963 (comment))

Reported on 1.11.3 https://discourse.julialang.org/t/sympy-makes-repl-to-stuck/124814/11

julia> using SymPy
Precompiling SymPy...
  19 dependencies successfully precompiled in 11 seconds. 33 already precompiled.

julia> sympy.apart(33/4)
8.25000000000000

julia> @syms n
(n,)

julia> ex = 1/(n*(n+3))
    1    
─────────
n⋅(n + 3)

julia> sympy.apart(e┌ Error: Error in the keymap
│   exception =
│    TypeError: in typeassert, expected REPL.REPLCompletions.MethodCompletion, got a value of type REPL.REPLCompletions.TextCompletion
│    Stacktrace:
│      [1] complete_keyword_argument
│        @ ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPLCompletions.jl:1040
│      [2] completions(string::String, pos::Int64, context_module::Module, shift::Bool, hint::Bool)
│        @ REPL.REPLCompletions ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPLCompletions.jl:1379
│      [3] complete_line(c::REPL.REPLCompletionProvider, s::REPL.LineEdit.PromptState, mod::Module; hint::Bool)
│        @ REPL ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPL.jl:637
│      [4] #complete_line#14
│        @ ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:428
│      [5] complete_line
│        @ ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:427
│      [6] complete_line
│        @ ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:369
│      [7] edit_tab (repeats 2 times)
│        @ ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2419
│      [8] #118
│        @ ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2465
│      [9] #invokelatest#2
│        @ ./essentials.jl:1055 [inlined]
│     [10] invokelatest
│        @ ./essentials.jl:1052 [inlined]
│     [11] #30
│        @ ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:1711
│     [12] macro expansion
│        @ ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2861 [inlined]
│     [13] macro expansion
│        @ ./lock.jl:273 [inlined]
│     [14] #282
│        @ ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2851
└ @ REPL.LineEdit ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2863

@IanButterworth IanButterworth added the REPL Julia's REPL (Read Eval Print Loop) label Jan 23, 2025
@newptcai
Copy link

I got this problem on 1.11.3 when I type

sympy.apart(e┌ Error: Error in the keymap

and hit tab.

This PR fixed it.

@IanButterworth IanButterworth added backport 1.10 Change should be backported to the 1.10 release backport 1.11 Change should be backported to release-1.11 labels Jan 23, 2025
@IanButterworth IanButterworth merged commit 88c71dd into JuliaLang:master Jan 23, 2025
10 checks passed
@danielwe
Copy link
Contributor

Looks like this might also fix #57127? I'm not able to verify myself at the moment, but it's the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.10 Change should be backported to the 1.10 release backport 1.11 Change should be backported to release-1.11 REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants