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 v = Module.Submodule.<TAB> is broken #57611

Open
giordano opened this issue Mar 3, 2025 · 1 comment · May be fixed by #57767
Open

[REPL] Autocompletion of v = Module.Submodule.<TAB> is broken #57611

giordano opened this issue Mar 3, 2025 · 1 comment · May be fixed by #57767
Labels
bug Indicates an unexpected problem or unintended behavior completions Tab and autocompletion in the repl regression Regression in behavior compared to a previous version regression 1.12 Regression in the 1.12 release REPL Julia's REPL (Read Eval Print Loop)
Milestone

Comments

@giordano
Copy link
Contributor

giordano commented Mar 3, 2025

Yes another REPL autocompletion bug in 1.12. On both 49263b7 (release-1.12 branch) and a5157c0 (master)

platform = Base.BinaryPlatforms.<TAB>

doesn't complete anything. Can be reproduced with any Module.Submodule name, not just Base.BinaryPlatforms, that's just an example. Removing the left-hand side of the assignment solves the issue. This is of course a regression, used to work correctly in v1.11-. I believe this is distinct from all other bugs I reported.

@giordano giordano added bug Indicates an unexpected problem or unintended behavior completions Tab and autocompletion in the repl regression Regression in behavior compared to a previous version regression 1.12 Regression in the 1.12 release REPL Julia's REPL (Read Eval Print Loop) labels Mar 3, 2025
@giordano giordano added this to the 1.12 milestone Mar 3, 2025
@vtjnash
Copy link
Member

vtjnash commented Mar 3, 2025

I think Sam is working on a fix for all of these soon

xal-0 added a commit to xal-0/julia that referenced this issue Mar 13, 2025
This commit replaces the heuristic parsing done by REPLCompletions.completions
with a new approach that parses the entire input buffer once with JuliaSyntax.
In addition to fixing bugs, the more precise parsing should allow for new
features in the future.

Some features now work in more situations "for free", like dictionary key
completion (the expression evaluated to find the keys is now more precise) and
method suggestions (arguments beyond the cursor can be used to narrow the list).

The tests have been updated to reflect slightly differing behaviour for string
and Cmd-string completion: the new code returns a character range encompassing
the entire string when completing paths (not observable by the user), and the
behaviour of '~'-expansion has be tweaked to be consistent across all places
where paths can be completed.  Some escaping issues have also been fixed.

Fixes: JuliaLang#55420, JuliaLang#55518, JuliaLang#55520, JuliaLang#55842, JuliaLang#56389, JuliaLang#57611
@xal-0 xal-0 linked a pull request Mar 13, 2025 that will close this issue
xal-0 added a commit to xal-0/julia that referenced this issue Mar 13, 2025
This commit replaces the heuristic parsing done by REPLCompletions.completions
with a new approach that parses the entire input buffer once with JuliaSyntax.
In addition to fixing bugs, the more precise parsing should allow for new
features in the future.

Some features now work in more situations "for free", like dictionary key
completion (the expression evaluated to find the keys is now more precise) and
method suggestions (arguments beyond the cursor can be used to narrow the list).

The tests have been updated to reflect slightly differing behaviour for string
and Cmd-string completion: the new code returns a character range encompassing
the entire string when completing paths (not observable by the user), and the
behaviour of '~'-expansion has be tweaked to be consistent across all places
where paths can be completed.  Some escaping issues have also been fixed.

Fixes: JuliaLang#55420, JuliaLang#55518, JuliaLang#55520, JuliaLang#55842, JuliaLang#56389, JuliaLang#57611
xal-0 added a commit to xal-0/julia that referenced this issue Mar 13, 2025
This commit replaces the heuristic parsing done by REPLCompletions.completions
with a new approach that parses the entire input buffer once with JuliaSyntax.
In addition to fixing bugs, the more precise parsing should allow for new
features in the future.

Some features now work in more situations "for free", like dictionary key
completion (the expression evaluated to find the keys is now more precise) and
method suggestions (arguments beyond the cursor can be used to narrow the list).

The tests have been updated to reflect slightly differing behaviour for string
and Cmd-string completion: the new code returns a character range encompassing
the entire string when completing paths (not observable by the user), and the
behaviour of '~'-expansion has be tweaked to be consistent across all places
where paths can be completed.  Some escaping issues have also been fixed.

Fixes: JuliaLang#55420, JuliaLang#55518, JuliaLang#55520, JuliaLang#55842, JuliaLang#56389, JuliaLang#57611
@giordano giordano linked a pull request Mar 14, 2025 that will close this issue
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 completions Tab and autocompletion in the repl regression Regression in behavior compared to a previous version regression 1.12 Regression in the 1.12 release REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants