-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Improve REPL completions #30569
Improve REPL completions #30569
Conversation
stdlib/REPL/src/REPLCompletions.jl
Outdated
funargs = ex_org.args[2:end] | ||
# handle broadcasting | ||
if ex_org.head === :. && ex_org.args[2] isa Expr | ||
funargs = ex_org.args[2].args |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem right to me --- in f.(args
the function won't necessarily be called on those arguments, but their elements (if arrays). This is a bit tricky to handle, so I'd leave it out for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doh, of course. I've pushed a commit such that we always return all methods that match the number of arguments and completely disregard any argument types.
IMHO that's better than not having any autocompletions for broadcasted functions, but lemme know if you don't think so and I'll remove that codepath :)
Is this good to go now or should I remove the broadcast completion part? |
Bump. |
Related to #24257 also? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't see anything objectionable here—it should at least be an improvement.
* fix internal repl completion error * fix error with broadcast method completions * method completions for broadcasted functioncalls * better broadcast funcall completions (cherry picked from commit a0474d7)
* fix internal repl completion error * fix error with broadcast method completions * method completions for broadcasted functioncalls * better broadcast funcall completions (cherry picked from commit a0474d7)
* fix internal repl completion error * fix error with broadcast method completions * method completions for broadcasted functioncalls * better broadcast funcall completions (cherry picked from commit a0474d7)
* fix internal repl completion error * fix error with broadcast method completions * method completions for broadcasted functioncalls * better broadcast funcall completions (cherry picked from commit a0474d7)
Fixes JunoLab/Juno.jl#216. Might also help with #28931.
This probably isn't the right way to fix this, but I'm not sure where the error originates either...