-
-
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
Support context module in replcompletions #26930
Conversation
AppVeyor: Travis: Doesn't seem to be anything to do with this PR. |
The 1/10000 hits again? #26909 |
Looks good to me! I think I'd vastly prefer the first option (changing the return type of Also, are you looking into extending this to enable changing the module the REPL evals into? |
A different struct for each completion type, so that clients can render/complete them appropriately. Eg in my emacs autocomplete I need to parse method completions like
Probably not. I don't use the repl much myself and I haven't had much luck integrating my emacs tools with it directly. I would want to send text to an active repl from Julia and have it behave as if it were pasted in, but this seems to be nontrivial. I noticed Juno doesn't show evaled text in the repl either - is this by design or because it's hard? |
Sounds great.
Alright, fair enough. I'll look into it then :)
It's not trivial, but definitely doable. A super hackish solution would be something like this, but I'm sure one could reuse much more of the REPL implementation. You'd also need to restore what was previously entered on the prompt, but IIRC 0.7 has support for that. Juno doesn't display evaled text in the REPL by design. |
I mostly wanted to handle prompt pasting without implementing it myself, so I would need to push it through the repl parser at least. Probably not the most important thing to focus on right now. I'll look at it again in the future. |
This is more or less there now, except there's a noticeable compilation delay now the first time I complete something in the repl. I probably need to add some precompilation signatures? |
Looks like the AppVeyor build timed out.
This disappears when REPL is precompiled via make (I had disabled precompilation for REPL during development). I think it's good to go @pfitzseb |
Restarting CI since it was a while ago. |
Looks like the first failure is a build timeout, but the second one is interesting:
While trying to autocomplete |
I'm not able to replicate this locally. Presumably it depends on what files exist in /tmp. It doesn't seem to be related to this PR though - the error is in a regex that I didn't change. |
Looks like #27642 should be fixed. Let's try CI again. |
One timeout, one OOM. Unrelated. |
Sorry for this taking time. Since last CI was 14 days ago, we should rerun it. |
No worries. I assume 1.0 is looming :) |
Seems like that doesn't trigger CircleCI |
Restarted manually. |
We have:
The repl tests seem to pass on the platforms where the build gets that far. |
RE: https://discourse.julialang.org/t/networked-repl/2085/15?u=jamii
@pfitzseb as promised :)
This just adds the context module.
For structured completions, I could:
structured_completions
function that does all the work andcompletions
calls that and converts the results to strings. Avoids breaking downstream stuff, but leaves a gross api wart.Which is preferable?