Skip to content

[REPL] Autocompletion of ModuleName.@macro_name is broken #55518

Closed
@giordano

Description

@giordano

On 5230d27

julia> Base.@time nothi<TAB>

autocompletes nothi to nothing_sentinel:

julia> Base.@time nothing_sentinel
ERROR: UndefVarError: `nothing_sentinel` not defined in `Main`
Suggestion: check for spelling errors or missing imports.
Stacktrace:
 [1] macro expansion
   @ ./timing.jl:579 [inlined]
 [2] top-level scope
   @ ./REPL[17]:1

If I understand it correctly, ModuleName.@macro symbol<TAB> autocompletes symbol inside ModuleName, not Main:

julia> module Issue55518
       macro name(expr) :($(esc(expr))) end
       const not_really_what_I_wanted = something
       end
Main.Issue55518

julia> using .Issue55518

julia> Issue55518.@name not<TAB>

This works correctly in Julia v1.10 and v1.11.0-rc1

Metadata

Metadata

Assignees

No one assigned

    Labels

    REPLJulia's REPL (Read Eval Print Loop)bugIndicates an unexpected problem or unintended behaviorcompletionsTab and autocompletion in the replregressionRegression in behavior compared to a previous version

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions