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

Incorrect package-name autocompletion suggestion within begin-end block #56389

Open
jishnub opened this issue Oct 30, 2024 · 0 comments · May be fixed by #57767
Open

Incorrect package-name autocompletion suggestion within begin-end block #56389

jishnub opened this issue Oct 30, 2024 · 0 comments · May be fixed by #57767
Labels
bug Indicates an unexpected problem or unintended behavior completions Tab and autocompletion in the repl regression 1.12 Regression in the 1.12 release REPL Julia's REPL (Read Eval Print Loop)
Milestone

Comments

@jishnub
Copy link
Member

jishnub commented Oct 30, 2024

At the top level, the completion suggestion is correct:
Image

However, within a begin-end block, the suggestion is incorrect:
Image

This issue happens on nightly.

julia> versioninfo()
Julia Version 1.12.0-DEV.1515
Commit 9850a388122 (2024-10-29 21:02 UTC)
Build Info:
  Official https://julialang.org release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 8 × Intel(R) Core(TM) i5-10310U CPU @ 1.70GHz
  WORD_SIZE: 64
  LLVM: libLLVM-18.1.7 (ORCJIT, skylake)
Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores)
Environment:
  JULIA_EDITOR = subl

This appears to be a regression, as the suggestion is correct on v1.11.1:
Image

@jishnub jishnub added completions Tab and autocompletion in the repl regression 1.12 Regression in the 1.12 release labels Oct 30, 2024
@giordano giordano added this to the 1.12 milestone Oct 30, 2024
@IanButterworth IanButterworth added the bug Indicates an unexpected problem or unintended behavior label Feb 7, 2025
@vtjnash vtjnash added the REPL Julia's REPL (Read Eval Print Loop) label Feb 17, 2025
xal-0 added a commit to xal-0/julia that referenced this issue Feb 26, 2025
Don't require a using/import to be on its own line to enter import mode; instead
look for partial import expressions and require the cursor be in the range where
modules/imported names would go.

Fixes JuliaLang#56389 (including the fix for JuliaLang#55842)
xal-0 added a commit to xal-0/julia that referenced this issue Feb 27, 2025
Don't require a using/import to be on its own line to enter import mode; instead
look for partial import expressions and require the cursor be in the range where
modules/imported names would go.

Fixes JuliaLang#56389 (including the fix for JuliaLang#55842)
xal-0 added a commit to xal-0/julia that referenced this issue Mar 3, 2025
Don't require a using/import to be on its own line to enter import mode; instead
look for partial import expressions and require the cursor be in the range where
modules/imported names would go.

Fixes JuliaLang#56389 (including the fix for JuliaLang#55842)
xal-0 added a commit to xal-0/julia that referenced this issue Mar 4, 2025
Don't require a using/import to be on its own line to enter import mode; instead
look for partial import expressions and require the cursor be in the range where
modules/imported names would go.

Fixes JuliaLang#56389 (including the fix for JuliaLang#55842)
xal-0 added a commit to xal-0/julia that referenced this issue Mar 13, 2025
Don't require a using/import to be on its own line to enter import mode; instead
look for partial import expressions and require the cursor be in the range where
modules/imported names would go.

Fixes JuliaLang#56389 (including the fix for JuliaLang#55842)
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 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.

4 participants