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 kwargs for some common functions no longer works #57836

Open
mbauman opened this issue Mar 20, 2025 · 0 comments
Open
Labels
completions Tab and autocompletion in the repl REPL Julia's REPL (Read Eval Print Loop)

Comments

@mbauman
Copy link
Member

mbauman commented Mar 20, 2025

In 1.10.7 and 1.11.2, one could autocomplete, for example, using DataFrames; show(df, allrTAB and get show(df, allrows=. This no longer works on 1.10.9 and 1.11.4.

Kwarg completions on functions with more than 40 methods was subsequently disabled due to #54131. But that case is quite extreme! An MWE here that emulates what PyCall is doing is:

struct F; end
Base.getproperty(::F, ::Symbol) = Any[cos, sin][rand(1:2)]
f = F()
f.bar(<TAB>

In short, this asks for tab completion on (::Any)(...) — that is, every method in the system! All 30k+ of them. So, yeah, that's gonna be sluggish.

The fix in #56963 used MAX_METHOD_COMPLETIONS to limit this. That's set to 40, based upon a display limitation. I think it'd be reasonable to increase this to something like 500, which would cover nearly all functions. In the examples above, finding the allrows kwarg for show — which has 304 methods with DF.jl loaded on 1.11.2 — has no noticeable latency.

Could we increase the limit here?

@vtjnash vtjnash added REPL Julia's REPL (Read Eval Print Loop) completions Tab and autocompletion in the repl labels Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completions Tab and autocompletion in the repl REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

No branches or pull requests

2 participants