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 completion fails when propertynames throws an error #53126

Closed
oscardssmith opened this issue Jan 30, 2024 · 0 comments · Fixed by #53127
Closed

REPL completion fails when propertynames throws an error #53126

oscardssmith opened this issue Jan 30, 2024 · 0 comments · Fixed by #53127
Labels
bug Indicates an unexpected problem or unintended behavior REPL Julia's REPL (Read Eval Print Loop)

Comments

@oscardssmith
Copy link
Member

MWE:

julia> struct A
       end
julia> Base.propertynames(::Type{A}) = error()
julia> A.┌ Error: Error in the keymap
│   exception =
│    
│    Stacktrace:
│      [1] error()
│        @ Base ./error.jl:44
│      [2] propertynames(::Type{A})
│        @ Main ./REPL[22]:1
│      [3] propertynames(x::Type, private::Bool)
│        @ Base ./reflection.jl:2557
│      [4] complete_symbol(ex::Any, name::String, ffunc::Any, context_module::Module)
│        @ REPL.REPLCompletions ~/dist/julia-cedar/vanilla/latest/share/julia/stdlib/v1.11/REPL/src/REPLCompletions.jl:193
│      [5] complete_identifiers!(suggestions::Vector{REPL.REPLCompletions.Completion}, ffunc::Function, context_module::Module, string::String, name::String, pos::Int64, dotpos::Int64, startpos::Int64, comp_keywords::Bool)
│        @ REPL.REPLCompletions ~/dist/julia-cedar/vanilla/latest/share/julia/stdlib/v1.11/REPL/src/REPLCompletions.jl:1108
│      [6] completions(string::String, pos::Int64, context_module::Module, shift::Bool)
│        @ REPL.REPLCompletions ~/dist/julia-cedar/vanilla/latest/share/julia/stdlib/v1.11/REPL/src/REPLCompletions.jl:1325
│      [7] complete_line(c::REPL.REPLCompletionProvider, s::REPL.LineEdit.PromptState, mod::Module)
│        @ REPL ~/dist/julia-cedar/vanilla/latest/share/julia/stdlib/v1.11/REPL/src/REPL.jl:560
│      [8] check_for_hint(s::REPL.LineEdit.MIState)
│        @ REPL.LineEdit ~/dist/julia-cedar/vanilla/latest/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:384
│      [9] (::REPL.LineEdit.var"#139#195")(s::REPL.LineEdit.MIState, data::Any, c::Union{Char, SubString{String}, String})
│        @ REPL.LineEdit ~/dist/julia-cedar/vanilla/latest/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2506
│     [10] #invokelatest#2
│        @ Base ./essentials.jl:955 [inlined]
│     [11] invokelatest
│        @ Base ./essentials.jl:952 [inlined]
│     [12] (::REPL.LineEdit.var"#27#28"{REPL.LineEdit.var"#139#195", String})(s::Any, p::Any)
│        @ REPL.LineEdit ~/dist/julia-cedar/vanilla/latest/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:1690
│     [13] prompt!(term::REPL.Terminals.TextTerminal, prompt::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
│        @ REPL.LineEdit ~/dist/julia-cedar/vanilla/latest/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2827
│     [14] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
│        @ REPL.LineEdit ~/dist/julia-cedar/vanilla/latest/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2729
│     [15] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
│        @ REPL ~/dist/julia-cedar/vanilla/latest/share/julia/stdlib/v1.11/REPL/src/REPL.jl:1352
│     [16] (::REPL.var"#64#70"{REPL.LineEditREPL, REPL.REPLBackendRef})()
│        @ REPL ~/dist/julia-cedar/vanilla/latest/share/julia/stdlib/v1.11/REPL/src/REPL.jl:401
└ @ REPL.LineEdit ~/dist/julia-cedar/vanilla/latest/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2829
@oscardssmith oscardssmith added bug Indicates an unexpected problem or unintended behavior REPL Julia's REPL (Read Eval Print Loop) labels Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant