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

SystemStackError during document completion with alias "loop" #2497

Closed
Earlopain opened this issue Aug 27, 2024 · 1 comment · Fixed by #2499
Closed

SystemStackError during document completion with alias "loop" #2497

Earlopain opened this issue Aug 27, 2024 · 1 comment · Fixed by #2499
Assignees
Labels
bug Something isn't working vscode This pull request should be included in the VS Code extension's release notes

Comments

@Earlopain
Copy link
Contributor

Description

Reproduction steps

I have this rather interesting code from ruby/ruby spec suite which to the eyes of ruby-lsp creates an alias loop:

begin
  class Integer
    alias old_spaceship <=>
    def <=>(other)
      raise
    end
  end
ensure
  class Integer
    alias <=> old_spaceship
  end
end

Typing 1. in the document raises SystemStackError because it keeps going back and forth.

Peek.2024-08-27.19-24.webm

Altogether not that impactful I believe, for one reason or another I have a copy of ruby/ruby in my project folder. The solution for me is just to tell ruby-lsp not to index it but I thought I'd raise this here anyways.


Separatly, ruby-lsp does not recover from this crash, leaves old diagnostics in view, and doesn't notify the user. Took me a while to understand why that syntax error didn't go away.

Ruby LSP Information

Details

VS Code Version

1.92.0

Ruby LSP Extension Version

0.7.17

Ruby LSP Server Version

0.17.16

Ruby LSP Addons

Ruby Version

3.3.4

Ruby Version Manager

rbenv

Installed Extensions

Click to expand
  • gitlens (15.3.1)
  • go (0.42.0)
  • vscode-rdbg (0.2.2)
  • remote-containers (0.380.0)
  • material-icon-theme (5.9.0)
  • vscode-yaml (1.15.0)
  • ruby-lsp (0.7.17)
  • sorbet-vscode-extension (0.3.36)
  • vscode-wakatime (24.6.0)

Ruby LSP Settings

Click to expand
Workspace
{}
User
{
  "enableExperimentalFeatures": false,
  "enabledFeatures": {
    "codeActions": true,
    "diagnostics": true,
    "documentHighlights": true,
    "documentLink": true,
    "documentSymbols": true,
    "foldingRanges": true,
    "formatting": true,
    "hover": true,
    "inlayHint": true,
    "onTypeFormatting": true,
    "selectionRanges": true,
    "semanticHighlighting": true,
    "completion": true,
    "codeLens": true,
    "definition": true,
    "workspaceSymbol": true,
    "signatureHelp": true,
    "typeHierarchy": true
  },
  "featuresConfiguration": {},
  "rubyVersionManager": {
    "identifier": "auto"
  },
  "customRubyCommand": "",
  "formatter": "none",
  "linters": null,
  "bundleGemfile": "",
  "testTimeout": 30,
  "branch": "",
  "pullDiagnosticsOn": "both",
  "useBundlerCompose": false,
  "bypassTypechecker": false,
  "rubyExecutablePath": "",
  "indexing": {},
  "erbSupport": true
}

@Earlopain Earlopain added bug Something isn't working vscode This pull request should be included in the VS Code extension's release notes labels Aug 27, 2024
@vinistock vinistock assigned vinistock and unassigned st0012 Aug 27, 2024
@vinistock
Copy link
Member

Thank you for the bug report! #2499 will fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working vscode This pull request should be included in the VS Code extension's release notes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants