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

Fix DAP's completion request with new IRB's completor #1025

Closed
wants to merge 1 commit into from

Conversation

st0012
Copy link
Member

@st0012 st0012 commented Oct 12, 2023

In IRB 1.8.2, the completor's design and API has been changed and thus would break DAP server's completion request. This commit fixes the issue by introducing a Completor class that abstracts away the differences between the old and new completor.

cc @tompng

In IRB 1.8.2, the completor's design and API has been changed and thus
would break DAP server's completion request. This commit fixes the
issue by introducing a `Completor` class that abstracts away the
differences between the old and new completor.
@st0012
Copy link
Member Author

st0012 commented Oct 14, 2023

With ruby/irb#730, the request should not be broken anymore once it's released. And while it's still better not to use the deprecated InputCompletor, I think we can wait a while to see how the new API will evolve before updating it.

@st0012 st0012 closed this Oct 14, 2023
@ko1
Copy link
Collaborator

ko1 commented Oct 19, 2023

I'm not sure but also LSP may need completion feature so different library is another idea for completion?

@st0012
Copy link
Member Author

st0012 commented Oct 19, 2023

You're right, LSP also needs completion feature and we're building one in ruby-lsp with a inhouse indexer, which we hope to extract into a gem when it's feature-completed.

But unlike a LSP server, IRB and debug both have access to binding objects and runtime information, which means it can get great completion result without going through the expensive indexing process. So I think it's still worth exploring a different completor for IRB and debug.

@st0012 st0012 deleted the fix-completion branch October 19, 2023 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants