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

with_server helper should not use stubs for the stub_no_typechecker option #2190

Closed
st0012 opened this issue Jun 15, 2024 · 2 comments · Fixed by #2474
Closed

with_server helper should not use stubs for the stub_no_typechecker option #2190

st0012 opened this issue Jun 15, 2024 · 2 comments · Fixed by #2474
Assignees
Labels
addons Tasks related to Ruby LSP addons bug Something isn't working server This pull request should be included in the server gem's release notes

Comments

@st0012
Copy link
Member

st0012 commented Jun 15, 2024

Description

stubs comes from Mocha, which is not a dependency of ruby-lsp. So if the addon doesn't use Mocha but sets stub_no_typechecker to true, this line will cause NoMethodError:

     NoMethodError:
       undefined method `stubs' for an instance of RubyLsp::GlobalState
@st0012 st0012 added bug Something isn't working addons Tasks related to Ruby LSP addons server This pull request should be included in the server gem's release notes labels Jun 15, 2024
@andyw8
Copy link
Contributor

andyw8 commented Jun 17, 2024

We could probably refactor so that it's an option passed to RubyLsp::Server.new, then no stubbing would be needed.

Copy link
Contributor

This issue is being marked as stale because there was no activity in the last 2 months

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addons Tasks related to Ruby LSP addons bug Something isn't working server This pull request should be included in the server gem's release notes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants