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] Autocompletion of using multiple submodules is broken #53999

Closed
giordano opened this issue Apr 8, 2024 · 2 comments · Fixed by #54610 or #54641
Closed

[REPL] Autocompletion of using multiple submodules is broken #53999

giordano opened this issue Apr 8, 2024 · 2 comments · Fixed by #54610 or #54641
Labels
kind:bug Indicates an unexpected problem or unintended behavior kind:regression Regression in behavior compared to a previous version stdlib:REPL Julia's REPL (Read Eval Print Loop)

Comments

@giordano
Copy link
Contributor

giordano commented Apr 8, 2024

Julia v1.10.2, in a REPL session:

using Base.Threads, Base.Thre<TAB>

results in

julia> using Base.Threads, Base.Thre┌ Error: Error in the keymap
│   exception =
│    UndefVarError: `out` not defined
│    Stacktrace:
│      [1] complete_identifiers!(suggestions::Vector{REPL.REPLCompletions.Completion}, ffunc::Any, context_module::Module, string::String, name::String, pos::Int64, dotpos::Int64, startpos::Int64; comp_keywords::Bool)
│        @ REPL.REPLCompletions ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/REPL/src/REPLCompletions.jl:1055
│      [2] complete_identifiers!
│        @ ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/REPL/src/REPLCompletions.jl:983 [inlined]
│      [3] completions(string::String, pos::Int64, context_module::Module, shift::Bool)
│        @ REPL.REPLCompletions ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/REPL/src/REPLCompletions.jl:1299
│      [4] complete_line(c::REPL.REPLCompletionProvider, s::REPL.LineEdit.PromptState, mod::Module)
│        @ REPL ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/REPL/src/REPL.jl:545
│      [5] complete_line(s::REPL.LineEdit.PromptState, repeats::Int64, mod::Module)
│        @ REPL.LineEdit ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:376
│      [6] complete_line(s::REPL.LineEdit.MIState)
│        @ REPL.LineEdit ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:367
│      [7] edit_tab(s::REPL.LineEdit.MIState, jump_spaces::Bool, delete_trailing::Bool)
│        @ REPL.LineEdit ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:2320
│      [8] edit_tab
│        @ ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:2320 [inlined]
│      [9] (::REPL.LineEdit.var"#114#170")(::REPL.LineEdit.MIState, ::Any, ::Vararg{Any})
│        @ REPL.LineEdit ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:2366
│     [10] #invokelatest#2
│        @ ./essentials.jl:892 [inlined]
│     [11] invokelatest
│        @ ./essentials.jl:889 [inlined]
│     [12] (::REPL.LineEdit.var"#27#28"{REPL.LineEdit.var"#114#170", String})(s::Any, p::Any)
│        @ REPL.LineEdit ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:1612
│     [13] prompt!(term::REPL.Terminals.TextTerminal, prompt::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
│        @ REPL.LineEdit ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:2749
│     [14] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
│        @ REPL.LineEdit ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:2651
│     [15] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
│        @ REPL ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/REPL/src/REPL.jl:1312
│     [16] (::REPL.var"#62#68"{REPL.LineEditREPL, REPL.REPLBackendRef})()
│        @ REPL ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/REPL/src/REPL.jl:386
└ @ REPL.LineEdit ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:2751
julia> 
julia> 

In Julia master this doesn't crash, but it also doesn't complete the second Base.Thre. This works as expected in Julia v1.9.

@giordano giordano added stdlib:REPL Julia's REPL (Read Eval Print Loop) kind:bug Indicates an unexpected problem or unintended behavior kind:regression Regression in behavior compared to a previous version labels Apr 8, 2024
@aviatesk
Copy link
Sponsor Member

Fixed by #53273 and will be included in v1.10.3.

@giordano
Copy link
Contributor Author

In Julia master this doesn't crash, but it also doesn't complete the second Base.Thre.

@giordano giordano reopened this Apr 15, 2024
aviatesk added a commit that referenced this issue May 29, 2024
aviatesk added a commit that referenced this issue May 31, 2024
E.g. completes `using Base.Sort, Base.Th|` to
`using Base.Sort, Base.Threads`.

- fixes #53999
@aviatesk aviatesk reopened this May 31, 2024
aviatesk added a commit that referenced this issue May 31, 2024
E.g. completes `using Base.Sort, Base.Th|` to
`using Base.Sort, Base.Threads`.

- fixes #53999
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Indicates an unexpected problem or unintended behavior kind:regression Regression in behavior compared to a previous version stdlib:REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
2 participants