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

Improve REPL completions #30569

Merged
merged 4 commits into from
Apr 7, 2019
Merged

Conversation

pfitzseb
Copy link
Member

@pfitzseb pfitzseb commented Jan 3, 2019

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...

@pfitzseb pfitzseb changed the title fix internal repl completion error Improve REPL completions Jan 7, 2019
@KristofferC KristofferC added backport pending 1.0 REPL Julia's REPL (Read Eval Print Loop) bugfix This change fixes an existing bug labels Jan 7, 2019
@KristofferC KristofferC mentioned this pull request Jan 11, 2019
53 tasks
funargs = ex_org.args[2:end]
# handle broadcasting
if ex_org.head === :. && ex_org.args[2] isa Expr
funargs = ex_org.args[2].args
Copy link
Member

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.

Copy link
Member Author

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 :)

@pfitzseb
Copy link
Member Author

Is this good to go now or should I remove the broadcast completion part?

@StefanKarpinski StefanKarpinski added triage This should be discussed on a triage call backport 1.1 and removed backport 1.0 triage This should be discussed on a triage call labels Jan 31, 2019
@JeffBezanson JeffBezanson removed triage This should be discussed on a triage call triage backport pending 1.0 labels Jan 31, 2019
@pfitzseb
Copy link
Member Author

pfitzseb commented Mar 1, 2019

Bump.

@vtjnash
Copy link
Member

vtjnash commented Apr 2, 2019

Related to #24257 also?

Copy link
Member

@vtjnash vtjnash left a 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.

@KristofferC KristofferC closed this Apr 2, 2019
@KristofferC KristofferC reopened this Apr 2, 2019
@KristofferC KristofferC merged commit a0474d7 into JuliaLang:master Apr 7, 2019
KristofferC pushed a commit that referenced this pull request Apr 15, 2019
* 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)
KristofferC pushed a commit that referenced this pull request Apr 17, 2019
* 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)
KristofferC pushed a commit that referenced this pull request Apr 20, 2019
* 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)
KristofferC pushed a commit that referenced this pull request Feb 20, 2020
* 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BoundsError: attempt to access 2-element Array
5 participants